i generate two sets of random numbers (sample size = 500) and run a regression between them and collect the slope t-stats. I expect 2.5% of the t-stats to be smaller than -1.96 and 2.5% of the t-stats to be greater than 1.96---am I doing something wrong...the results are close (I get 2.5% below -1.96 but the 97.5 percentile is 1.988) -- is this just sampling variation or am I doing something wrong? thanks
--------------
scalar reps
reps = 50000
matrix(reps,1) results
rndseed 123456
for !i=1 to reps
smpl 1 500
genr epsilony{!i}=@nrnd
genr epsilonx{!i}=@nrnd
equation eq{!i}
equation eq{!i}.ls epsilony{!i} c epsilonx{!i}
results(!i,1)=eq{!i}.@tstats(2)
delete epsilony{!i}
delete epsilonx{!i}
delete eq{!i}
next
am i doing something wrong
Moderators: EViews Gareth, EViews Moderator
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: am i doing something wrong
This probably is just sampling error. The standard deviation for the two-sided rejection rate with 50,000 trials is about 0.001. You might want to up the number of trials considerably.
It might speed up the program some if you reused the variable names, just replacing the contents.
It might speed up the program some if you reused the variable names, just replacing the contents.
Return to “Econometric Discussions”
Who is online
Users browsing this forum: No registered users and 34 guests