testing about means

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

testing about means

murad-2
any body please tell me how can i test the difference of means for more
than two related samples
Reply | Threaded
Open this post in threaded view
|

Re: testing about means

Marta García-Granero
Hi Murad,

m> any body please tell me how can i test the difference of means for more
m> than two related samples

You need a Repeated Measures ANOVA (Using the GUI: ANALYZE - GENERAL
LINEAR MODEL - REPEATED MEASURES):

* Sample dataset *.
DATA LIST LIST/placebo terbut teofil terteo(4 F8.1).
BEGIN DATA
3.18 3.27 3.34 3.87
0.80 2.73 2.18 2.28
2.13 2.12 2.13 2.26
1.35 1.92 2.28 2.72
2.10 2.06 2.53 2.73
1.30 2.45 2.35 4.41
3.30 3.10 3.07 3.86
2.93 2.49 2.93 3.25
3.50 3.03 3.32 2.78
0.55 2.26 1.96 2.08
0.33 0.37 1.12 1.05
1.55 2.48 2.23 2.38
2.10 2.12 2.31 2.46
3.49 3.63 3.70 3.63
0.70 0.83 1.57 1.27
2.20 3.06 2.92 2.95
1.35 2.32 2.12 2.65
1.73 2.74 2.68 2.92
4.68 4.54 4.63 4.81
0.83 1.16 2.04 2.70
0.43 0.93 2.70 3.16
END DATA.
VAR LABEL placebo 'FEV(lt) after Placebo'.
VAR LABEL terbut  'FEV(lt) after Terbutaline'.
VAR LABEL teofil  'FEV(lt) after Theophylline'.
VAR LABEL terteo  'FEV(lt) after Terbutaline+Theophylline'.

GLM placebo terbut teofil terteo
  /WSFACTOR = treatmnt 4 Simple(1)
  /MEASURE = FEV
  /PRINT = DESCRIPTIVE
  /WSDESIGN = treatmnt .

HTH,
Dr. Marta García-Granero, PhD
Statistician
Reply | Threaded
Open this post in threaded view
|

aggregate or matrix?

Frank Berry
Hi all,
    I have four variables (subj, region, eth - all char variables, and score - numeric variable) with a total of 20,000 records.

    Below is a syntax used to get count (N), average, standard deviation (SD) and pct for each category (e1 to e5) in the variable of 'eth' BY 'subj' 'region' 'eth'.

  AGGREGATE
     /OUTFILE = 'C:\Data\Sum_A.sav'
     /BREAK = subj region eth
     /count = N
     /avg = MEAN(score)
     /sd = SD(score)
     /eth1_frac = FIN(eth,1,1)
     /eth2_frac = FIN(eth,2,2)
     /eth3_frac = FIN(eth,3,3)
     /eth4_frac = FIN(eth,4,4)
     /eth5_frac = FIN(ethnic,5,5).
  COMPUTE eth1_N = eth1_frac*count.
  COMPUTE eth2_N = eth2_frac*count.
  COMPUTE eth3_N = eth3_frac*count.
  COMPUTE eth4_N = eth4_frac*count.
  COMPUTE eth5_N = eth5_frac*count.
  COMPUTE e1_Pct = eth1_N/count*100.
  COMPUTE e2_Pct = eth2_N/count*100.
  COMPUTE e3_Pct = eth3_N/count*100.
  COMPUTE e4_Pct = eth4_N/count*100.
  COMPUTE e5_Pct = eth5_N/count*100.
    Execute.

  Below is what I’d like to get in addition to the count, mean and SD BY 'subj' 'region' 'eth'.
  region               eth        N         pct       prop
  0001                e1        1          2%       0.015384615
  0001                e2        5          8%       0.076923077
  0001                e3        22        34%     0.338461538
  0001                e4        30        46%     0.461538462
  0001                e5        7          11%     0.107692308
  0001                Total    65        100%   1
But the aggregate function above doesn't seem to work here. Is there a solution using matrix or other functions/syntax? Thank you.
Frank




---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
Reply | Threaded
Open this post in threaded view
|

Re: aggregate or matrix?

Maguin, Eugene
Frank,

I may be really wrong here but I think a problem MIGHT be trying to use eth
as both a break variable and an accumulation variable. If I were to put into
words what you are wanting to do, I say that you want the number of records,
mean and sd of score, and the ethnicity category proportions within region
and subject. That's why I don't thing eth should be a break var.

You say that aggregate doesn't work. Is there an error message? What is the
error message? Is there a warning? Where does it (aggregate) seem to fail
at?

Gene Maguin
Reply | Threaded
Open this post in threaded view
|

Multivariate ancova using Mixed

Maguin, Eugene
In reply to this post by Frank Berry
All,

I'd like to do a multivariate ancova wherein a set of DVs are adjusted for
only THEIR pretest value (and not all covariates). I've posted this before
and the reply from the list as well as somebody at spss was that it wouldn't
work in either glm or manova.

It seems like the setup would be something like

Mixed dv1 dv2 dv3 by group with pre1 pre2 pre3/fixed=group/
   random=intercept.

However, does this sort of model have one intercept or three. I'd think
three because each regression as its own intercept and there is no apriori
reason to expect that all equations will have the same intercept.

Has anyone done anything like this? Can you offer some guidance?

Thanks, Gene Maguin
Reply | Threaded
Open this post in threaded view
|

Re: aggregate or matrix?

Beadle, ViAnn
In reply to this post by Frank Berry
Have you looked at the reporting tools rather than doing this through AGGREGATE. By this I mean things like TABLES, or CTABLES.
-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Frank Berry
Sent: Monday, July 24, 2006 2:30 PM
To: [hidden email]
Subject: aggregate or matrix?

Hi all,
    I have four variables (subj, region, eth - all char variables, and score - numeric variable) with a total of 20,000 records.

    Below is a syntax used to get count (N), average, standard deviation (SD) and pct for each category (e1 to e5) in the variable of 'eth' BY 'subj' 'region' 'eth'.

  AGGREGATE
     /OUTFILE = 'C:\Data\Sum_A.sav'
     /BREAK = subj region eth
     /count = N
     /avg = MEAN(score)
     /sd = SD(score)
     /eth1_frac = FIN(eth,1,1)
     /eth2_frac = FIN(eth,2,2)
     /eth3_frac = FIN(eth,3,3)
     /eth4_frac = FIN(eth,4,4)
     /eth5_frac = FIN(ethnic,5,5).
  COMPUTE eth1_N = eth1_frac*count.
  COMPUTE eth2_N = eth2_frac*count.
  COMPUTE eth3_N = eth3_frac*count.
  COMPUTE eth4_N = eth4_frac*count.
  COMPUTE eth5_N = eth5_frac*count.
  COMPUTE e1_Pct = eth1_N/count*100.
  COMPUTE e2_Pct = eth2_N/count*100.
  COMPUTE e3_Pct = eth3_N/count*100.
  COMPUTE e4_Pct = eth4_N/count*100.
  COMPUTE e5_Pct = eth5_N/count*100.
    Execute.

  Below is what I'd like to get in addition to the count, mean and SD BY 'subj' 'region' 'eth'.
  region               eth        N         pct       prop
  0001                e1        1          2%       0.015384615
  0001                e2        5          8%       0.076923077
  0001                e3        22        34%     0.338461538
  0001                e4        30        46%     0.461538462
  0001                e5        7          11%     0.107692308
  0001                Total    65        100%   1
But the aggregate function above doesn't seem to work here. Is there a solution using matrix or other functions/syntax? Thank you.
Frank




---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.