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

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?

  • Distance le 5km; midpoint = 2.5
  • Distance between 6 to 15km; midpoint = 10.5
  • Distance between 16 to 30km; midpoint = 23
  • Distance beween 31 to 100km; midpoint = 75
proc iml;
	distcat={2.5,10.5,23,75};
	contrL=orpol(distcat,4);
	print contrL;
quit;

 

Output: 
Capture3.PNG

 

 

 

 

 

 

 

 

 

 

 

 

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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.

View solution in original post

1 REPLY 1
Rick_SAS
SAS Super FREQ

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.

sas-innovate-2024.png

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.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 1 reply
  • 1357 views
  • 2 likes
  • 2 in conversation