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
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.
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!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: