COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Issues with power analysis using PROC MIXED (long)

• Email
• Follow

```Greetings! (Sorr this is long...)

We are designing a longitudinal study, and have the luxury of some
pilot data available to us for planning purposes. The pilot data
suggest that there is an important effect of the predictor (=91x=92) on
the outcome (=91y=92). I decided to use some of the methodology described
in chapter 12 of SAS for Mixed Models to identify the minimum number
of subjects needed to detect the effect observed in the pilot data
with 80% power.  The result from that analysis was that we require
impossibly large numbers of subjects.

I found this somewhat surprising, and wanted to explore the
methodology from the book under much simpler circumstances without any
longitudinal component. Using either PROC POWER or PROC GLMPOWER for a
simple 2-sample t-test or ANOVA, we require a total of 40 subjects
(twice the pilot study sample size) to detect the observed effect.
Online calculators give the same requirement. The methods in Chap 12
of SAS for Mixed Models, however, require impossibly large sample
sizes, even for the greatly simplified example. I realize that this
sledge hammer approach would not be done in normal practice, but the
results should be the same.

I am certainly missing a crucial point. Any ideas??

**The pilot data;
data d1;
input x y;
datalines;
0      0
0      0
0      0
0      5
0      0
0      0
0      5
0      5
0     -5
0     -5
0    -10
1      5
1      5
1     -5
1      0
1     15
1      5
1     10
1      0
1      5
;
run;

** regress y on x and get type3 test output. This is directly from
section 12.2 in the book. Note that there are no random effects;

ods output tests3=3Dt3;
proc mixed data =3D d1;
model y =3D x ;
run;

data f_power;
set t3;
noncen=3DnumDF*FValue;
alpha=3D0.05;
FCrit =3D finv(1-Alpha, NumDF, DenDF, 0);
Power =3D 1-probF(FCrit,NumDF,DenDF,NonCen);
run;
proc print noobs data =3D f_power; run;
****F-statistic for predictor x is 4.32 (p=3D0.052) =92Observed=92 power is

***** data augmenting by doubling the observed data so that we have 40
subjects with same response and predictor profile as in the pilot
sample. This is also from the book p482.;
data AugD1;
set d1;
do i =3D 1 to 2;
output;
end;
run;

***** Compute denominator degrees of freedom with augmented data;
ods output tests3=3Dt3Aug;
proc mixed data =3D AugD1;
model y =3D x;
run;

********** Place ddfm from augmented data result into macrovar df;
proc sql;	select dendf into :df from t3Aug; quit;
%put &df;

******* New Power with augmented data;
ods output tests3=3Dt3Update;
proc mixed data =3D d1;
model y =3D x / ddf=3D&df.;
run;

data f_power2;
set t3update;
noncen=3DnumDF*FValue;
alpha=3D0.05;
FCrit=3Dfinv(1-Alpha,NumDF, DenDF, 0);
Power =3D 1-probF(FCrit,NumDF,DenDF,NonCen);
run;
proc print noobs data =3D f_power2; run;
****F-statistic for predictor x is still 4.32 (p=3D0.0445) =92Observed=92
power is only 0.52;
****The result is that with double the subjects we achieve only 52%
power to detect the pilot data effect size. You can augment the pilot
data by a factor of 20 and power is still only about 54%.;
```
 0

See related articles to this posting

`it is very useful! thank you! `
 0
Reply indimatrix (1) 5/22/2010 10:45:57 AM

1 Replies
463 Views

Similar Articles

12/19/2013 8:28:18 PM
page loaded in 29625 ms. (0)

Similar Artilces:

UPDATE power analysis using SAS proc mixed
A little while back I posted a message about difficulties using PROC MIXED for power analysis following chapter 12 in SAS System for Mixed Models. I've since been in contact with Walt Stroup who identified some errors in chapter 12. Below is a revision of code for section 12.2. The revision uses the variance components estimates for the original dataset in the replicate data analysis and power calculations. title1 "Output 12.1 from the book"; ods select covparms tests3 ; proc mixed data=mice nobound cl ; class cage condition diet; model gain= condition|diet /...

proc mianalyze the random effect of null model using proc mixed
Dear List: I am using proc mi, proc mixed, and proc mianalyze to analyze my data considering the uncertainty of the missingness. After getting the multiple imputed data sets I started the null model using the proc mixed. I got the results of the null model. But I could not run the proc mianalyze on the random effects of the null model to synthesize the results. It keeps saying the var is not in the parm dataset. I am wondering if someone in this list can shed some lights on this. I think I probably missed some syntax but could not figure out. The following is my sas codes: /*null model*/ pro...

confusion about analysis of covariance in PROC MIXED
hello, everyone: i have a question. Now i need to use ANCOVA model to analyze the treatment effect. my response variables are two: post baseline blood pressure and change of blood pressure from baseline. My independent variables are baseline value(covariate) and treatment(drug/vehicle), gender. i analysed the blood pressure and its change from baseline separately as follows: proc mixed; model pressure=treatment sex treatment*sex baseline; lsmean treatment/pdiff; run; proc mixed; model change=treatment sex treatment*sex baseline; lsmean treatment/pdiff; run; my statistical ...

The use of estimate statements in proc mixed
Hi! I have a question regarding the use of estimate och perhaps lsmeans statements in sas. I am currently working with a growth model relating a continious outcome to the age of the subject using proc mixed controlling for a number of covariates. The basic model is: proc mixed data=a method=ml noitprint noclprint=10 covtest ; class id baseage ; model y = baseage group age age*group age*age age*age*group / chisq cl residual vciry outp=resid1 outpm=resid2 ; random int age / sub=id type=un g gcorr vcorr ; run; It is a polynomial model where I estimate cross secti...

Proc Mixed performance/specification issue
Hi: I am using proc mixed to estimate a linear growth model for a unbalanced sample of 3025 persons with between 5 and 54 repeated observations (average about 30). The data set has about 140,000+ cases. The basic model is a simple linear function of time (Y=Bo +B1time+ e). The intercept is specified to be a linear function of a set of 20 covariates and a random effect. The slope is specified to be a linear function of a dummy variable and a random effect. The dummy variable is set to one indicating the time of an event and all time periods after the event. Events are experienced by 5-6% of per...

how executing a step-by-step analysis through PROC MIXED?
Hello List, I have a panel data set with 5 obs of several factors for each of the 103 units. I'm trying to fit a model by PROC MIXED. After studying my data, I can say that the there is no significative time effect (besides, I have only 5 obs thorugh time). I could implement this consideration through an F-test (as described in Hsiao or Greene) but does a different way to demonstrate it using PROC MIXED exist? Then I think that I should fit a fixed effect model because it is highly probable that the territorial effect influence the response variable level. Through PROC TSCSREG I ran the...

Multivariate Random Regression using Proc Mixed ?
Hi All- I have a question for the group that I am hoping you can give me some insight on. My goal is to do a multivariate random regression in SAS with Proc Mixed.. I'll describe the experimental design (briefly), and am hopeful that someone on the list can tell me if my what I am aiming to do is called multivariate random regression, and moreover, if/how Proc Mixed can do it. I have many replicate individuals of many inbred lines that were grown in several different experimental environments. I measured size of all of these individuals 6 times over their life cycle. My go...

Re: Power analysis for Mixed model ANOVA
--- "mark@bu" <smarkandsusan@AOL.COM> wrote: > Hi All: > I need to do a power analysis for a two level ANOVA with subjects > as > a random factor, any ideas? > Mark > The standard reference is to a paper by Walter Stroup which can be found at http://statistics.unl.edu/faculty/steve/802/2001/power_sas.pdf The last time that I looked this over, it was a little rough around the edges with some lines of text which appear out of order. Thus, it is not the easiest thing to read. But it does contain the material that you need to construct power functions for a...

Power and display issues using the wrong mains
Hello, I just got sent a C64 from the states, and before I blow it up I wondered whether it would work. Firstly the power: the drive and the Microline brick both take 117VAC 60Hz. If I get one of those travel adapter things to convert from the local 240VAC 50Hz, will the computer run properly? The video output strikes me as a potential problem too. I'm OK with viewing NTSC images as I have an A1084S from my Amiga days, however if the mains is supplied at an unexpected frequency (i.e. 50Hz instead of 60Hz) will the video signal be alright? Finally and somewhat less critically, one of ...

sample size question when using proc mixed
Hi everyone, I am running a (longitudinal) proc mixed analysis. The table below gives the sample size at each timepoint from time=0 through time=4. time Samplesize 0 81 1 43 2 33 3 24 4 24 The output of proc mixed says there are 51 subjects in the analysis, with a max of 5 observations per subject. The output also says Number of Observations Read is 205, and the Number of Observations Used is 167. I am not sure how there can be 51 subjects used for this analysis. I am guessing that it is OK for a subject to have data at time 0, but not at tim...