BookmarkSubscribeRSS Feed
Pandawaffle
Calcite | Level 5

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 $;
cards

;
  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;
run;

 

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 $;
cards
;
  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;
   run;

 

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?

1 REPLY 1
FreelanceReinh
Jade | Level 19

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:

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 791 views
  • 0 likes
  • 2 in conversation