08-27-2015 11:10 AM
Hello I wondered if I could get some help me get started with the correct SAS syntax required to perform the following tests on my data.
using the example Cohort/variables I have made up below .
Statistical significance of differences Continuous variables - Wilcoxon rank sum tests prior to matching .
Statistical significance of differences Continuous variables - Wilcoxon signed-rank tests post-match.
Statistical significance of differences Categorical variables,prior to matching will be assessed using chi-squared tests.
Statistical significance of differences Categorical variables, after matching using McNemar’s tests.
Disease Cohort Control Cohort
Cat Variables Diabetes(yes/no) 1 0
Gender 1 2
Continuous Variable Age 80 30
Once I understand the basic syntax I can then incorporate it into a macro to run over all my categorical and continuous variables.
Many thanks in advance.
08-27-2015 11:19 AM
For Wilcoxon use PROC NPAR1WAY
For Chi-Square/McNemar use PROC FREQ
Read the documentation - specifically the Examples section for each, they have worked through examples.
08-27-2015 11:58 AM
Thank you for your quick response when you mention 'Read the documentation - specifically the Examples section for each, they have worked through examples.' Where will I find this?
08-27-2015 12:20 PM
And when you get into proc freq you don't need to use a macro to "run over all my categorical" variables.
The Tables syntax in proc freq allows you to cross multiple variables:
tables (var1 var2 var3 var4) * (Var5 var6 var7 var8) / <options such a chi-sq tests go here>;
This will do the requested tests for all combinations of the variables in the first () with those in the second ()
Var1*Var5 Var1*Var6 Var1*var7 var1*var8 and so forth.