am i doing something wrong

For econometric discussions not necessarily related to EViews.

Moderators: EViews Gareth, EViews Moderator

russellrobins
Posts: 16
Joined: Tue Jul 10, 2012 12:42 pm

am i doing something wrong

Postby russellrobins » Tue Apr 18, 2017 7:01 am

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

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: am i doing something wrong

Postby startz » Tue Apr 18, 2017 8:28 am

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.


Return to “Econometric Discussions”

Who is online

Users browsing this forum: No registered users and 34 guests