hello,
As part of a Monte Carlo study
I have the following population regression model:
Y= 262 -0.006X2-2.4X3+u
I was told to assume that u is normally distributed with N(0,42)
I have to Generate 64 observations for u
I have to combine the observations with the 64 observations on X2 and X3 in a table that I already have to estimate the corresponding sample regression model Betahat1 Betahat 2 and Betahat3 using the OLS method. Save the estimated coefficients.
Then they want me to repeat that 20 times. Is there a shortcut to create u, u1,u2...u20 where each of them is N(0,42) and gets added to my editor then I want a command that regresses my X2 and X3 and each of the Us on my Y. So I have to have 20 regressions. I wanna do that in one command. Is there a way? Please help.
Related Posts with loops
Conditional time formula help Hi, I have the following panel data and I need to generate conditional new variables that equal …
Using egen to create new treatment variableHi, I am looking at a study involving student performance and gender. Students are observed taking …
Staggered diff in diffHey everyone, I will be evaluation a policy consisting on granting property rights to communities, …
Add pseudo R2 in probit with marginal effectsHello Stata legends, I've been searching on statalist for a while, but I can't seem to figure out m…
Survival analysis and problems with multiple rows for each patientHello everyone, I'm working with survival analysis and a cox model in a dataset collected from an R…
Subscribe to:
Post Comments (Atom)
0 Response to loops
Post a Comment