Help using Base SAS procedures

2-Factor ANOVA using mean/std/n instead of lists?

New User
Posts: 1

2-Factor ANOVA using mean/std/n instead of lists?

I am trying to preform a 2-factor anova, IV's=pre & post treatment, patient1 & patient 2 DV=loudness.  Some of the data I am using is archival from an excel file and does not contain the actual lists of data, only the mean, std, and n for each task.  How do I enter these values and have SAS preform a 2-factor anova using them?  I was able to find a method that allowed t-tests to be calculated in this way:


data Para;
input _stat_ $ value  group $;

  n         93        a
  mean      74.08      a
  std       0.29     a
  n         90         b
  mean      73.53     b
  std       0.71    b
proc ttest data=Para;
 title 'Pre vs Post Para';
 class group;
var value;


I tried to replicate this input with proc glm, but it does not work.  It instead reads the value column as one continuos set of data instead of the discrete mean, n, and std.  Giving average values of e.g. (90+74.08+.29)/3 which it then compares.


data SASTest;
input _stat_ $ value  group $ paitent $;
  n         93        pre     DS03
  mean      74.08      pre     DS03
  std       0.29     pre     DS03
  n         90         post DS03
  mean      73.53     post     DS03
  std       0.71    post     DS03
  n         93        pre     DS01
  mean      68.58      pre     DS01
  std       1.422     pre     DS01
  n         90         post DS01
  mean      70.80     post     DS01
  std       0.8    post     DS01
proc glm data=SAStest;
      class group paitent;
      model value = group paitent group*paitent;


I know other Stats programs are capable of plugging and chugging the mean, std, and n for procedures like they are a TI-83 calculator formula, and I have to believe SAS is capable of it as well, but how do I code for this?

Trusted Advisor
Posts: 1,115

Re: 2-Factor ANOVA using mean/std/n instead of lists?

Apparently, PROC GLM does not share PROC TTEST's feature to accept summary statistics as input data for certain analyses.


However, a bit of googling yields:

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation