How to output bootstrap results to LaTeX in R

134 views Asked by At
library(boot)

boot_function <- function(data, indices, formula){
  d <- data[indices, ]
  obj <- lm(formula, d)
  coefs <- summary(obj)$coefficients
  coefs[, "Std. Error"]
}

set.seed(8527)

fmla <- as.formula("mpg ~ hp * cyl")
seboot <- boot(mtcars, boot_function, R = 5, formula = fmla)
seboot

The final command in the above code outputs a table with with the coefficient, the bias and the standard errors. How can I export this boot object to LaTeX or a matrix or dataframe?

0

There are 0 answers