Skip to content
Prev 2347 / 7420 Next

Average Regression and the bootstrap

Hej again,

thank you that I know now that this is called parametric bootstrap.

I am very unsure if I am doing right. So I tried to write a bootstrap
script which is now as follows:

data <- data.frame(Y,X1a,X1b,X2)

X1.gen <- function()
{
	X1 <- function()runif(length(X1a), X1a, X1b)
}

statistic <- function()
{
	X1 <- function()runif(length(X1a), X1a, X1b)
	model <- lm(Y~X1())		
}

regression.boot <- boot(data, statistic, R=1000, sim="parametric", ran.gen=X1.gen)



It is somehow incomplete...not sure how to proceed, as I am really new to bootstrap and R. Maybe I am doing totally wrong... not sure at all.
Just to get it clear to me: Bootstrap resamples from the finite dataset with the "dynamic" X1 (170 cases in my example) and during each sampling a new X1 is calculated (runif) for the case? 
Maybe someone can help me here...

thanks to you all
Johannes






-------- Original-Nachricht --------
--