Programming the statistical procedures from SAS

Calculating the square root of the variance of the residual of a regression

Accepted Solution Solved
Reply
Contributor
Posts: 35
Accepted Solution

Calculating the square root of the variance of the residual of a regression

Hi Guys,

I am trying to calculate the square root of the variance of the residual of a regression.

Basically if the regression is the following:

R= a+ b1.MKT+ b2.SMB + B3.HML+ B4.UMD + E

Then I am trying to compute X, where

X = √ var(E).


PS: Also, can the result be stored in a SAS dat. file, because I need to merge it to the original data set later on.


Thanks a lot for the help guys! Appreciate it!


Accepted Solutions
Solution
‎01-13-2013 10:15 PM
Respected Advisor
Posts: 4,756

Re: Calculating the square root of the variance of the residual of a regression

Proc reg will give you the root mean square error as part of the fit statistics. You can output them in dataset myStats :

proc reg data=myData plots=none;

     model R = MKT SMB HML UMD;

ods output FitStatistics=myStats;

run;

PG

PG

View solution in original post


All Replies
Solution
‎01-13-2013 10:15 PM
Respected Advisor
Posts: 4,756

Re: Calculating the square root of the variance of the residual of a regression

Proc reg will give you the root mean square error as part of the fit statistics. You can output them in dataset myStats :

proc reg data=myData plots=none;

     model R = MKT SMB HML UMD;

ods output FitStatistics=myStats;

run;

PG

PG
🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 161 views
  • 0 likes
  • 2 in conversation