A few days ago, I asked for help interpeting a linear trend here: http://support.sas.com/kb/22/912.html
It turns out my analysis was wrong because of my categories were unevenly spaced (in addition to not being sorted, which they are now). @sld pointed me to this resource to deal with unequally spaced treatments: http://support.sas.com/kb/22/912.html
But I can't seem to figure out how to use PROC IML to find my coefficients for the linear trend.
First, since my categories are distances, do I use the midpoint?
proc iml;
distcat={2.5,10.5,23,75};
contrL=orpol(distcat,4);
print contrL;
quit;
Output:
If my code is right, how do I interpet the output to create my dose levels to test for linear trend with PROC GLM "Estimate"?
Thanks!
I assume you only have the categories of distance? If you know the actual distances, you could use DISTANCE as a covariate.
I don't think it matters too much how you set up the reference values. Using the midpoint seems reasonable because it is the expected value of the distance traveled under the assumption of uniformly distributed villages.
As to the interpretation, the columns of the matrix represent polynomials of degree 0 (intercept), 1, 2, 3, and 4. So the elements of the second column (-0.447 ... 0.8365) are the values to use for the linear trend. The elements of the third column (0.598 ... 0.223) are the values to use for the quadratic trend.
I assume you only have the categories of distance? If you know the actual distances, you could use DISTANCE as a covariate.
I don't think it matters too much how you set up the reference values. Using the midpoint seems reasonable because it is the expected value of the distance traveled under the assumption of uniformly distributed villages.
As to the interpretation, the columns of the matrix represent polynomials of degree 0 (intercept), 1, 2, 3, and 4. So the elements of the second column (-0.447 ... 0.8365) are the values to use for the linear trend. The elements of the third column (0.598 ... 0.223) are the values to use for the quadratic trend.
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.