simreg | R Documentation |
Derive parameter estimates and standard errors by simulation, or by bootstrap resampling.
simreg(formula, data, nsim = 1000)
bootreg(formula, data, nboot = 1000)
formula |
Model formula |
data |
Data frame from which names in formula can be taken |
nsim |
Number of repeats of the simulation ( |
nboot |
Number of bootstrap resamples ( |
Matrix of coefficients from repeated simulations, or from bootstrap
resamples. For simreg
there is one row for each repeat
of the simulation. For bootreg
there is one row for each
resample.
Note that bootreg
uses the simplest
possible form of bootstrap. For any except very large datasets,
standard errors may be substantial under-estimates
John Maindonald
https://maths-people.anu.edu.au/~johnm/nzsr/taws.html
xy <- data.frame(x=rnorm(100), y=rnorm(100))
simcoef <- simreg(formula = y~x, data = xy, nsim = 100)
bootcoef <- bootreg(formula = y~x, data = xy, nboot = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.