Hi everyone. I need to make bootstrap for regression paramatr for price and weight in new sample from general population, but i don't know how to make regression in new sample.
My code looks:
sample
preserve
local var1 = "price"
local var2 = "weight"
local n=r(N)
local B=1000
local alfa = 0.05 //b to liczba próbek
forvalues i=1/`B'{
generate sampl`i'=`var1'[ceil(`n'*runiform())]
generate sampl1`i'=`var2'[ceil(`n'*runiform())]
reg var1 var 2
}
Can you help me ?
My code looks:
sample
preserve
local var1 = "price"
local var2 = "weight"
local n=r(N)
local B=1000
local alfa = 0.05 //b to liczba próbek
forvalues i=1/`B'{
generate sampl`i'=`var1'[ceil(`n'*runiform())]
generate sampl1`i'=`var2'[ceil(`n'*runiform())]
reg var1 var 2
}
Can you help me ?
Comment