I have a model:
proc surveylogistic data=table; class year industry; model dep (descending) = x1 x2 x3 x4 x5 year industry /rsquare; run;
To test if x1 is statistically different than x2, I do:
proc surveylogistic data=table; class year industry; model dep (descending) = x1 x2 x3 x4 x5 year industry /rsquare; test1: test x1 = x2; run;
How do I do the same in PROC SURVEYREG? This does not work:
proc surveyreg data=table; class year industry; model dep (descending) = x1 x2 x3 x4 x5 year industry /solution rsquare; test1: test x1 = x2; run;
The above throws an error,
ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, *, -, /, :, @, _CHARACTER_, _CHAR_, _NUMERIC_, |. ERROR 200-322: The symbol is not recognized and will be ignored
I'm looking to test if two coefficients in PROC SURVEYREG are statistically different from each other.
Since SURVEYREG does not have a TEST statement that will allow multiple effects on it. Instead you should use a CONTRAST statement instead.
test x1=x2;
which is the same as
x1-x2=0
would translate to
contrast 'test_label' x1 1 x2-1;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.