Statalist


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

st: R: R: ANCOVA repeated measures error


From   "Carlo Lazzaro" <carlo.lazzaro@tin.it>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: R: R: ANCOVA repeated measures error
Date   Tue, 10 Nov 2009 09:07:19 +0100

Steve wrote:

<I'm assuming that the "robust cluster (var)" option takes into account the
repeated measures and adjusted the SE accordingly.>

Steve is right. Whereas coefficients point estimates are unaffected by
repeated measures on the same unit, standard errors may be too small (and CI
too narrow and P-values too small) if clustering in the data is not
considered. 
This topic is well covered in Kirkwood BR, Stern JAC. Essential medical
ststistics. 2nd edition. Malden, MA: Blackwell Science, 2003: 355-360.

For Statalisters (using Stata 9/2 SE), 

Juul S. An Introduction to Stata for Health Researchers. College Station,
TX: Stata Press, 2006: 204-207 

reports an interesting example on dealing with clustered data. 

Eventually, an updated edition of Svend's interesting textbook is possibly
available (please, see http://www.stata.com/bookstore/ishr.html).

HTH and Kind Regards,
Carlo
-----Messaggio originale-----
Da: Steve [mailto:cheesehead.in.tx@gmail.com] 
Inviato: lunedì 9 novembre 2009 21.37
A: Carlo Lazzaro
Cc: statalist@hsphsun2.harvard.edu
Oggetto: Re: R: ANCOVA repeated measures error

Carlo,

Thanks for the reply.  I tried the first command and it seems to work.
 It provided me with coefficients and std. errors.  I'm assuming that
the "robust cluster (var)" option takes into account the repeated
measures and adjusted the SE accordingly.  Thanks a heap for your
help... though. I'm still wondering where I was going wrong with the
anova command.

- Steve



On Mon, Nov 9, 2009 at 12:46 PM, Carlo Lazzaro <carlo.lazzaro@tin.it> wrote:
> Dear Steve,
> would it be useful to invoke:
>
> regress ser_conc drug age, robust cluster(id)
>
> or
>
> by drug, sort : regress ser_conc drug age, robust cluster(id)
>
>
> Kind Regards,
> Carlo
> -----Messaggio originale-----
> Da: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di Steve
> Inviato: lunedì 9 novembre 2009 18.49
> A: statalist@hsphsun2.harvard.edu
> Oggetto: st: ANCOVA repeated measures error
>
> Hi all,
>
> I recently moved to STATA from another statistical software and was
> trying to analyze some data using ANCOVA, but I keep getting an error
> message.
>
> 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.
>
> So what am I doing wrong there?  Is the model totally wrong the way I
> have written it?  I tried searching for help on this but didn't get
> far.  Would appreciate any help I can get.  Thanks a heap in advance.
>
> - Steve
> *
> *   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/
>
>
>



*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index