Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: Slopes as outcomes models using gllamm


From   Daniel Kaplan <dbk2006@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Slopes as outcomes models using gllamm
Date   Wed, 13 Mar 2013 13:28:09 -0400

Hi Statalisters-

I am examining 3,300 home health care patients nested within 650 home
health care service agencies.  My dataset has sample weights for
patients and agencies, although each patient has an equal probability
of being randomly sampled from the agency where it was sampled.  I
have 6 outcome variables, two of which are continuous and normally
distributed (I have successfully used xtmixed for accomplishing the
analyses described below using these outcomes).  In addition, one
outcome is binary and three are count variables that are highly skewed
toward zero.  The count and binary outcomes are the ones I am trying
to examine with gllamm in order to utilize the sample weights (which I
am not allowed to do with xtmixed).  My key predictor variable is a
5-point scale.



Analysis Plan:

I am building a series of models for each outcome variable, as follows:

Fully Unconditional Model
Un-adjusted Model of the association of the key predictor with the
outcome variable
Model of association of key predictor with outcome, adjusted for
patient characteristics
Model of association of key predictor with outcome, adjusted for
patient and agency characteristics
Slopes-as-Outcomes Model where all effects are fixed except the slopes
and intercepts



Variables:  (I know you often request actual variable names, so here
are a few in each category)



Key Predictor Variable-

centcog             (Group Mean Centered, 5-point scale of cognitive status)



Outcome Variables-

totalvisits           (uncentered, count of number of service visits)

readmiss           (uncentered, binomial indicator of whether
enrollment in home care is a readmission or not [0=no, 1=yes])



Consumer Characteristics-

centage             (Group Mean Centered, age in years)

centmale           (Group Mean Centered, binomial indicator of gender
[0=female, 1=male])



Service Agency Characteristics-

centagyyrs         (Grand Mean Centered, number of years agency has
been in business)

centfte               (Grand Mean Centered, number of full-time
employees at agency)



Sampling and Weight Variables-

agynum             (sampling variable identifying the agency from
which patients are sampled)

patwt                 (patient weight)

agywt                (agency weight)





Models:



Fully Unconditional Model-

gllamm totalvisits, i(agynum) family(poisson) pweight(agywt) adapt

gllamm readmiss, i(agynum) family(logit) pweight(agywt) adapt


Unadjusted Model of the association of the key predictor with the
outcome variable-

gllamm totalvisits centcog, i(agynum) family(poisson) pweight(agywt) adapt

gllamm readmiss centcog, i(agynum) family(logit) pweight(agywt) adapt



Model of association of key predictor with outcome, adjusted for
patient characteristics-

gllamm totalvisits centcog centage centmale, i(agynum) family(poisson)
pweight(agywt) adapt

gllamm readmiss centcog centage centmale, i(agynum) family(logit)
pweight(agywt) adapt



Model of association of key predictor with outcome, adjusted for
patient and agency characteristics-

gllamm totalvisits centcog centage centmale centagyyrs centfte,
i(agynum) family(poisson) pweight(agywt) adapt

gllamm readmiss centcog centage centmale centmale centagyyrs centfte,
i(agynum) family(logit) pweight(agywt) adapt


Slopes-as-Outcomes Model where all effects are fixed except the slopes
and intercepts-

gllamm totalvisits centcog centage centmale centagyyrs centfte,
i(agynum) nrf(2) eq(?) family(poisson) pweight(agywt) adapt

gllamm readmiss centcog centage centmale centmale centagyyrs centfte,
i(agynum) nrf(2) eq(?) family(logit) pweight(agywt) adapt





Questions:

Do the models seem appropriate, or are there mistakes in how they are built?
Is there a way to include the patient weights, or is this not
necessary because the agency weights are sufficient?
In the final set of models, I think the way to set the intercepts and
slopes as random effects is with nrf(2) followed by eq(?), but I do
not know if I am correct and I do not know how to properly create
those equations for the constant and slope.  Is this the correct
procedure?  And if so, how do I create those equations?  The examples
are always something like eq cons: cons, but it is obvious that some
prior steps are omitted from these examples because they don't show
what "cons" is the constant for.
Do I need to use the link(log) and link(binomial) commands for these
any of these logit and poisson models?

Any suggestions, resources, syntax edits, or advice you could offer
would be greatly appreciated.

--
Dan
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index