I created a data with 100,000 obs with uniform distribution and also created information for education and wage, but now, from this data I have to create 500 samples random (each one has to be different) but I tried with bsample and it didn't work, so I read about forvalue and foreach (to apply a loop), but I'm not sure how use it, I was trying but I really need help. This is how I created the data:
set obs 100000
set seed 20
gen x=_n
gen educ= 1 + (4-1)*uniform()
sum educ
gen error= 0.5+1*invnorm(uniform())
gen leduc=log(educ)
gen lwage=0.35*leduc+error
gen wage=(educ^0.35)*exp(error)
Related Posts with multiple random sample from a data
Missing values in usespssHi Statalist! I have a question regarding missing values using the (ssc) command usespss. When I us…
Studentized Residuals after Robust RegressionI am estimating a regression with clustered standard errors and would like to obtain studentized res…
Ouput tests for difference in coefficients from one regression; how to output multiple tests in same columnI have searched the forum and was unable to find the answer to my question. Granted, the title of my…
Did sample size resulted from propensity score matching dependent on the different outcome measuresI did a propensity score matching separately for 3 different outcome measures using the same matchin…
How to deal with a big dataset?I am trying to run OLS regression with my panel dataset of over 100,000,000 observations. My target …
Subscribe to:
Post Comments (Atom)
0 Response to multiple random sample from a data
Post a Comment