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.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.