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
mlogit transitionCheers, Sample data here: Code: clear set obs 16 egen id = seq(), from(1) to(4) block(4) egen gro…
Graphing interactions using mixedDear Statalist users, I'm trying to graph some age and cohort interactions from some results gener…
Question on using collapseHi everyone, I'm having some doubts on the usage of the -collapse- command and I'm hoping you could…
factor variables and marginsHi, I estimate the following regression: Code: reg Y ib2001.YEAR i.AGE, where YEAR=2000, 200…
Instruments in FE modelI have a following question: I want to estimate the impact of increased use of computers by employee…
Subscribe to:
Post Comments (Atom)
0 Response to loops
Post a Comment