Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bootstrap for regression parametrs

    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 ?

  • #2
    Reposted in the General Forum and answered at

    https://www.statalist.org/forums/for...sion-parametrs

    Comment

    Working...
    X