Help using Base SAS procedures

paired samples T-test for categorical variables

Reply
Contributor
Posts: 37

paired samples T-test for categorical variables

Dear friends,

 

I am doing data analysis for two time points, 10 year difference.

 

what tests should I use for categorical variables, e.g self-reported alcohol and cigarette intake, and education level? please help.

 

Very kind regards

 

Respected Advisor
Posts: 3,001

Re: paired samples T-test for categorical variables

Please clearly state what the response variable is that you are planning on analysing, and clearly state your planned analysis; and we can tell you how to do this in SAS.

--
Paige Miller
Contributor
Posts: 37

Re: paired samples T-test for categorical variables

Posted in reply to PaigeMiller
Dear Page Miller,
Thank you for a speedy response.
Yes, I am working with SAS.
 
I have done the paired samples t-test for continuous variables,i.e plasma phospholipid fatty acids.
proc ttest data=Start_women;

title 'Paired t-test with proc ttest, paired statement';

paired C14_0Myristic_2015*PLC14_2005
C16_0Palmitic_2015*PLC16_2005
C18_0Stearic_2015*PLC18_2005
C16_1n7Palmitoleate_2015*PLC16_1n7_2005
C18_1n9Oleic_2015*PLC18_1n9_2005
C18_3n3ALA_2015*PLC18_3n3_2005
C20_5n3EPA_2015*PLC20_5n3_2005
C22_5n3DPA_2015*PLC22_5n3_2005
C22_6n3DHA_2015*PLC22_6n3_2005
C18_2n6Linoleic_2015*PLC18_2n6_2005
C18_3n6GLA_2015*PLC18_3n6_2005
C20_3n6_2015*PLC20_3n6_2005
C20_4n6ARA_2015*PLC20_4n6_2005
C22_4n6Adrenic_2015*PLC22_4n6_2005
C22_5n6Osbond_2015*PLC22_5n6_2005
C20_3n9Mead_2015*PLC20_3n9_2005;
run;
 
That was successful. Now I need to d the same for self-reported alcohol intake (0= never and stopped taking alcohol, 1= currently taking alcohol), Tobacco use ( 0= never and stopped smoking, 1= currently smoking) and education level. (0=no formal education, 1=formal education), all for two-time points, baseline and 10 years later
I am not sure which test to use.
Please advise.
 
very kind regards
Respected Advisor
Posts: 3,001

Re: paired samples T-test for categorical variables

You want a Chi-Squared test to compare the binomial proportions (percent 0 vs percent 1) at the two time periods. This can be done using PROC FREQ with the CHISQ option.

--
Paige Miller
Contributor
Posts: 37

Re: paired samples T-test for categorical variables

Posted in reply to PaigeMiller

Thank you very much.

I was not sure, Now I am.

 

Ask a Question
Discussion stats
  • 4 replies
  • 257 views
  • 2 likes
  • 2 in conversation