Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: ANCOVA repeated measures error


From   Philip Ender <[email protected]>
To   [email protected]
Subject   Re: st: ANCOVA repeated measures error
Date   Mon, 9 Nov 2009 12:35:24 -0800

Steve-

What you have is a mixed model with drug as the between subject and
age within subject.  Further, the design is unbalanced.
I recomend using -xtmixed- for your analysis.  The code would look
something like this in Stata 11:

xtmixed ser_conc i.drug c.age || id:

In Stata 10 and earlier the code looks like this:

xi: xtmixed ser_conc i.drug age || id:

-xtmixed- will deal with all of the repeatedness and unbalancedness
and automatically use the correct error for each term.

On 9nov2009 Steve <[email protected]> wrote:

>...
>The data being analyzed includes some serum concentration values for
>an analyte (continuous variable) that was measured at multiple times
>during a 3 year period from study participants.  The number of
>measurements for each person ranges from 10-15.  The participants are
>also divided into two groups (drug+ and drug-).  Over time, as the
>person ages, the concentrations change.  We were trying to evaluate
>whether the rate of change... the slope... was different between the
>two groups.
>
>To do this, I thought that I could do an ANCOVA which includes a
>variable denoting repeated measures.  The syntax I used was:
>
>anova ser_conc drug age, continuous(age) repeated(id) partial
>
>where, id is a unique numeric id for each study subject.  The error I
>get states: "could not determine between-subject basic unit; use
>bseunit() option".  I've tried using the "bse" option but that doesn't
>help.  I've also included id in the model but that didn't help either.
>Obviously, I'm doing something wrong with the syntax but haven't been
>able to figure out the problem.
>...

Phil
-- 
Phil Ender
Statistical Consulting Group
UCLA  Academic Technology Services
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index