Dear all, thank you very much for all your support.
I have a new problem.
Now I am doing some linear regression, I am able to get standardized estimates but not standardized 95% CI intervals. I am getting 95% CI but not standardized. Please help.
Here are my codes
proc reg data=ALICEPAPER1MAY2018; model log_WHtR_2005=PPPL1Satfat PPPL2N3VLCAA PPPL3n62dbond PPPL4DGLAadreDPA PPPL5MUFA PPPL6ALA/ ss1 ss2 stb clb covb corrb ; run;
here is the output
SAS Output
Intercept | -0.70443 | 0.00577 | -122.10 | <.0001 | 350.03800 | 350.29948 | 0 | -0.71576 | -0.69310 |
0.05131 | 0.00579 | 8.86 | <.0001 | 1.85243 | 1.84520 | 0.30658 | 0.03994 | 0.06268 | |
0.03584 | 0.00576 | 6.22 | <.0001 | 0.91055 | 0.90978 | 0.21527 | 0.02453 | 0.04714 | |
-0.00614 | 0.00577 | -1.06 | 0.2874 | 0.02648 | 0.02663 | -0.03683 | -0.01746 | 0.00518 | |
0.01153 | 0.00576 | 2.00 | 0.0456 | 0.09409 | 0.09420 | 0.06927 | 0.00022408 | 0.02285 | |
-0.01511 | 0.00576 | -2.62 | 0.0089 | 0.16172 | 0.16149 | -0.09069 | -0.02643 | -0.00379 | |
-0.01519 | 0.00578 | -2.63 | 0.0088 | 0.16241 | 0.16241 | -0.09096 | -0.02653 | -0.00385 |
Please help, my supervisor insist we have to generate that, I have tried a few codes, that I have found online, without success, some of them are
proc standard data=ALICEPAPER1MAY2018 mean=0 std=1 out=AlICEMAY_2018; proc reg; model log_WHtR_2005=PPPL1Satfat PPPL2N3VLCAA PPPL3n62dbond PPPL4DGLAadreDPA PPPL5MUFA PPPL6ALA /stb; run;
I am only getting standardized estimates with this code. Please help me get standardized 95%CI for standardized estimates.
Thank you. I am looking forward to hearing from you.
very kind regards
Achieng
You can use PROC STDIZE to physically standardize the variables and then request CLB for the same model on the standardized variables:
/* original parameter estimates, including STB */
proc reg data=sashelp.class plots=none;
model height=weight age/ stb clb;
ods select ParameterEstimates;
quit;
/* standardize the numerical data */
proc stdize data=sashelp.class out=stdClass;
run;
/* regression on the standardized data gives same parameter
estimates as the STB option on the original data. But now
the CLB option gives the CIs for the standardized coefficients */
proc reg data=stdClass plots=none;
model height=weight age/ clb;
ods select ParameterEstimates;
quit;
Once the variables are standardized, the 95% CI is on the standardized data.
The 95% CI on the estimates is from the PROC REG statement using the OUTEST table.
proc reg data=ALICEPAPER1MAY2018 OUTEST = WANT;
Then check the WANT data set for the estimates.
@Achieng wrote:
Dear all, thank you very much for all your support.
I have a new problem.
Now I am doing some linear regression, I am able to get standardized estimates but not standardized 95% CI intervals. I am getting 95% CI but not standardized. Please help.
Here are my codes
proc reg data=ALICEPAPER1MAY2018; model log_WHtR_2005=PPPL1Satfat PPPL2N3VLCAA PPPL3n62dbond PPPL4DGLAadreDPA PPPL5MUFA PPPL6ALA/ ss1 ss2 stb clb covb corrb ; run;here is the output
SAS Output
Parameter EstimatesVariable Label DF ParameterEstimate StandardError t Value Pr > |t| Type I SS Type II SS StandardizedEstimate 95% Confidence LimitsIntercept1PPPL1Satfat1PPPL2N3VLCAA1PPPL3n62dbond1PPPL4DGLAadreDPA1PPPL5MUFA1PPPL6ALA1
Intercept -0.70443 0.00577 -122.10 <.0001 350.03800 350.29948 0 -0.71576 -0.69310 0.05131 0.00579 8.86 <.0001 1.85243 1.84520 0.30658 0.03994 0.06268 0.03584 0.00576 6.22 <.0001 0.91055 0.90978 0.21527 0.02453 0.04714 -0.00614 0.00577 -1.06 0.2874 0.02648 0.02663 -0.03683 -0.01746 0.00518 0.01153 0.00576 2.00 0.0456 0.09409 0.09420 0.06927 0.00022408 0.02285 -0.01511 0.00576 -2.62 0.0089 0.16172 0.16149 -0.09069 -0.02643 -0.00379 -0.01519 0.00578 -2.63 0.0088 0.16241 0.16241 -0.09096 -0.02653 -0.00385
Please help, my supervisor insist we have to generate that, I have tried a few codes, that I have found online, without success, some of them are
proc standard data=ALICEPAPER1MAY2018 mean=0 std=1 out=AlICEMAY_2018; proc reg; model log_WHtR_2005=PPPL1Satfat PPPL2N3VLCAA PPPL3n62dbond PPPL4DGLAadreDPA PPPL5MUFA PPPL6ALA /stb; run;I am only getting standardized estimates with this code. Please help me get standardized 95%CI for standardized estimates.
Thank you. I am looking forward to hearing from you.
very kind regards
Achieng
You can use PROC STDIZE to physically standardize the variables and then request CLB for the same model on the standardized variables:
/* original parameter estimates, including STB */
proc reg data=sashelp.class plots=none;
model height=weight age/ stb clb;
ods select ParameterEstimates;
quit;
/* standardize the numerical data */
proc stdize data=sashelp.class out=stdClass;
run;
/* regression on the standardized data gives same parameter
estimates as the STB option on the original data. But now
the CLB option gives the CIs for the standardized coefficients */
proc reg data=stdClass plots=none;
model height=weight age/ clb;
ods select ParameterEstimates;
quit;
Thank you very much.
It worked.
I love the SAS community.
Yeah;)
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.