SHAZAM Community

Debug mode is on, do not use it in production. To turn it off, use DEBUG = False in your file.

Ask Your Question

Residual variance

asked 2011-10-28 12:41:44 +0000

Jack gravatar image

updated 2011-10-28 15:55:20 +0000

Hi should I use the following code to save the residual variance:

assuming sample 1 to 20

GEN1 RVAR=(1/(20-1))*Sum(RES)

Maybe i am missing something..I did not get the residual variance.Please help.

edit retag flag offensive close merge delete


GEN1 is the same as SAMPLE 1 1 and GENR so this will only make this calculation for the 1st observation. To make this work try. GENR RVAR=SUM(RES,20)/18 where 18 is N-K. This will match the output from LIST

SHAZAMHelp gravatar imageSHAZAMHelp ( 2011-10-28 16:14:29 +0000 )edit

Thank you. But N-K= 20-1=19. (no constant)

Jack gravatar imageJack ( 2011-10-28 16:59:00 +0000 )edit

In the above a constant is automatically inserted. To exclude a constant use the NOCONSTANT option.

SHAZAMHelp gravatar imageSHAZAMHelp ( 2011-10-28 17:23:10 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2011-10-28 15:58:52 +0000

updated 2011-10-28 17:23:57 +0000

Try the LIST option which prints this for you.


ols Y X / list

Further descriptions on these sorts of calculations are here:

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2011-10-28 12:41:44 +0000

Seen: 385 times

Last updated: Oct 28 '11

Related questions