BookmarkSubscribeRSS Feed
Kimberly09
Fluorite | Level 6

Hi - 

I'm searching for a SAS Proc procedure to use to obtain ttest and chi-square statistics while clustering by a location variable. I'm working with longitudinal data for a randomized controlled trial. It is in wide format (1 observation per subject per row). This is not survey data so Proc survey would not the an appropriate procedure to use for this data set. I could use the basic proc ttest or proc freq/chisq to obtain the results; however, I need to account for differences within location. I'm working with binary as well as continuous variables. 

 

For example, I want to test whether gender (gen 1 =male, 2 =female)  is statistically significant between the treatment and control groups (group_assign 0 = control, 1 = treatment) while clustering for location (1= NY, 2 = Chicago) and whether age (cont. var) is statistically significant between groups while clustering for location (if no clustering, I check this with proc ttest). 

 

I'll be grateful for any syntax or resource that could help me solve this problem .Thanks 

 

1 REPLY 1
cminard
Obsidian | Level 7

Based on your description, I do not think that "clustering" is the correct term. I think that you want to adjust for the effects of location and age. I suggest a general linear model. But, you state that the data is "longitudinal" implying that you have repeated measures. If that is the case, then you may have to do something like a general linear mixed model with random effects.

 

Providing a sample of the data may be helpful to provide more specific recommendations.

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 513 views
  • 0 likes
  • 2 in conversation