Heather H Kettrey
2019-Jul-02 12:58 UTC
[R] Conditional Logistic Regression with Multilevel Data [using clogistic() in Epi and lmer() in lme4???]
I need to run some conditional logistic regression models on a multilevel matched dataset (propensity score matched data from multiple research sites). I can pretty easily use the clogistic() function in the Epi package to run conditional logistic regression models on each separate/nested subset of the data (e.g., data obtained from each research site separately). However, I cannot figure out how to run an aggregate analysis (of all aggregated sites) in a way that accounts for clustering. When using unconditional logistic regression I can run the aggregate analysis lmer() function in the lme4 package. However, I cannot figure out how to run conditional logistic regression with the lmer() function (I am also open to any other packages/functions that might work). Thanks in advance for help with this. Heather Hensman Kettrey, PhD Assistant Professor of Sociology Clemson University [[alternative HTML version deleted]]
Abby Spurdle
2019-Jul-03 01:22 UTC
[R] Conditional Logistic Regression with Multilevel Data [using clogistic() in Epi and lmer() in lme4???]
> an aggregate analysis (of all aggregated sites) in a way that accountsfor clustering I'm not familiar with this topic. For the benefit of those of us (like me), who are not experts on conditional logistic regression, what does the above statement mean? Hopefully, someone who is more familiar with this topic, can help you more. [[alternative HTML version deleted]]
Marc Schwartz
2019-Jul-03 02:22 UTC
[R] Conditional Logistic Regression with Multilevel Data [using clogistic() in Epi and lmer() in lme4???]
> On Jul 2, 2019, at 8:58 AM, Heather H Kettrey <hkettre at clemson.edu> wrote: > > I need to run some conditional logistic regression models on a multilevel matched dataset (propensity score matched data from multiple research sites). > > > I can pretty easily use the clogistic() function in the Epi package to run conditional logistic regression models on each separate/nested subset of the data (e.g., data obtained from each research site separately). However, I cannot figure out how to run an aggregate analysis (of all aggregated sites) in a way that accounts for clustering. > > > When using unconditional logistic regression I can run the aggregate analysis lmer() function in the lme4 package. However, I cannot figure out how to run conditional logistic regression with the lmer() function (I am also open to any other packages/functions that might work). > > > Thanks in advance for help with this. > > > Heather Hensman Kettrey, PhD > > Assistant Professor of Sociology > > Clemson UniversityA search does not seem to yield specific examples that are relevant. That being said, it might be worthwhile posting to r-sig-mixed-models: https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models where experts in the domain of multi-level models reside. There may be an approach using glmer() or an alternative package, where you can define the paired observations within sites in manner that makes sense for the clustering of data at the site level. Regards, Marc Schwartz
Bert Gunter
2019-Jul-03 02:30 UTC
[R] Conditional Logistic Regression with Multilevel Data [using clogistic() in Epi and lmer() in lme4???]
This is off topic. This list is about R programming, not statistics. The OP should consult statistical resources, such as stats.stackexchange.com . Bert On Tue, Jul 2, 2019, 6:22 PM Abby Spurdle <spurdle.a at gmail.com> wrote:> > an aggregate analysis (of all aggregated sites) in a way that accounts > for clustering > > I'm not familiar with this topic. > For the benefit of those of us (like me), who are not experts on > conditional logistic regression, what does the above statement mean? > > Hopefully, someone who is more familiar with this topic, can help you more. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Viechtbauer, Wolfgang (SP)
2019-Jul-03 08:41 UTC
[R] Conditional Logistic Regression with Multilevel Data [using clogistic() in Epi and lmer() in lme4???]
Dear Heather, You can do this with clogit() from the 'survival' package, using strata(). See: http://www.metafor-project.org/doku.php/tips:clogit_paired_binary_data You can also use lme4::glmer(), glmmML::glmmML(), or metafor::rma.glmm() for that. [1] [1] Rerunning this example, I noticed a slight issue with the structuring of the output from rma.glmm() -- if you want to run that example, install the 'devel' version of metafor as described here: https://wviechtb.github.io/metafor/#installation Best, Wolfgang -----Original Message----- From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Heather H Kettrey Sent: Tuesday, 02 July, 2019 14:59 To: r-help at r-project.org Subject: [R] Conditional Logistic Regression with Multilevel Data [using clogistic() in Epi and lmer() in lme4???] I need to run some conditional logistic regression models on a multilevel matched dataset (propensity score matched data from multiple research sites). I can pretty easily use the clogistic() function in the Epi package to run conditional logistic regression models on each separate/nested subset of the data (e.g., data obtained from each research site separately). However, I cannot figure out how to run an aggregate analysis (of all aggregated sites) in a way that accounts for clustering. When using unconditional logistic regression I can run the aggregate analysis lmer() function in the lme4 package. However, I cannot figure out how to run conditional logistic regression with the lmer() function (I am also open to any other packages/functions that might work). Thanks in advance for help with this. Heather Hensman Kettrey, PhD Assistant Professor of Sociology Clemson University
Marc Schwartz
2019-Jul-03 11:26 UTC
[R] Conditional Logistic Regression with Multilevel Data [using clogistic() in Epi and lmer() in lme4???]
Wolfgang, Perhaps I am missing something here, but with clogit(), or Heather's initial attempt at using clogistic(), as both have 'strata' arguments, wouldn't the 'strata' argument need to be able to accept a nested structure, along the lines of strata(id / site)? On the page that you link to below, I don't see an example of that type of nesting structure. The mixed effects models would generally support a nested random effects specification, if that makes sense here. Regards, Marc Schwartz> On Jul 3, 2019, at 4:41 AM, Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote: > > Dear Heather, > > You can do this with clogit() from the 'survival' package, using strata(). See: > > http://www.metafor-project.org/doku.php/tips:clogit_paired_binary_data > > You can also use lme4::glmer(), glmmML::glmmML(), or metafor::rma.glmm() for that. [1] > > [1] Rerunning this example, I noticed a slight issue with the structuring of the output from rma.glmm() -- if you want to run that example, install the 'devel' version of metafor as described here: > > https://wviechtb.github.io/metafor/#installation > > Best, > Wolfgang > > -----Original Message----- > From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Heather H Kettrey > Sent: Tuesday, 02 July, 2019 14:59 > To: r-help at r-project.org > Subject: [R] Conditional Logistic Regression with Multilevel Data [using clogistic() in Epi and lmer() in lme4???] > > I need to run some conditional logistic regression models on a multilevel matched dataset (propensity score matched data from multiple research sites). > > I can pretty easily use the clogistic() function in the Epi package to run conditional logistic regression models on each separate/nested subset of the data (e.g., data obtained from each research site separately). However, I cannot figure out how to run an aggregate analysis (of all aggregated sites) in a way that accounts for clustering. > > When using unconditional logistic regression I can run the aggregate analysis lmer() function in the lme4 package. However, I cannot figure out how to run conditional logistic regression with the lmer() function (I am also open to any other packages/functions that might work). > > Thanks in advance for help with this. > > Heather Hensman Kettrey, PhD > Assistant Professor of Sociology > Clemson University