BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Reader587
Calcite | Level 5

How do I change Beta=0 to Beta=2 for proc reg?

1 ACCEPTED SOLUTION

Accepted Solutions
5 REPLIES 5
PaigeMiller
Diamond | Level 26
Please explain further. Provide more detail. Provide example data.
--
Paige Miller
Reader587
Calcite | Level 5
data plastic2;
input hardness minutes;
cards;
199.0 16.0
205.0 16.0
196.0 16.0
200.0 16.0
218.0 24.0
220.0 24.0
215.0 24.0
223.0 24.0
237.0 32.0
234.0 32.0
235.0 32.0
230.0 32.0
250.0 40.0
248.0 40.0
253.0 40.0
246.0 40.0
;run;
proc reg;
model hardness=minutes/clb alpha=.01;run;
I am trying to change the test from Ho:B1=0 vs Ha:B1^=0 to Ho:B1=2 vs. Ha:B1^=2
PaigeMiller
Diamond | Level 26

Use the TEST statement in PROC REG. Examples: https://documentation.sas.com/doc/en/pgmmvacdc/9.4/statug/statug_reg_syntax20.htm

--
Paige Miller
Reader587
Calcite | Level 5
What if I want to do a one-sided t-test for regression?
PaigeMiller
Diamond | Level 26

The PROC REG output contains two-sided tests. If you were to do a two-sided test at the alpha=0.05 level, then 0.025 chance of a type I error is in the upper tail and 0.025 chance of a type I error is in the lower tail. 

 

You want a one-sided test with alpha=0.05 in one tail and alpha=0 in the other tail. So, if the pvalue from SAS is <0.10, your one-sided test is statistically significant at the alpha=0.05 level, because 0.05 chance of type I error in one tail, and 0 percent chance of type I error in the other tail.

--
Paige Miller

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 722 views
  • 1 like
  • 2 in conversation