Thanks to visit codestin.com
Credit goes to github.com

Skip to content

lmer wrapper buglet #8

@coatless

Description

@coatless

In #6, there was a wrapper added to perform the extraction. However, we extracted a bit too many terms. In particular, we only want to extract elements corresponding to the random-effects, not all effects (p). c.f.

T1 <- VarCorr(x)[[group_term]][1:p,1:p]

Consider revising given:

iccbeta/R/iccbeta.R

Lines 145 to 152 in f649ced

# Figure out the class term:
term_labels <- attr(mf, "names")
# Retrieve the _LAST_ variable (assume it is a group variable.)
# To Do: What is the best way to make this approach robust ?
group_term <- term_labels[length(term_labels)]
T1 <- VarCorr(x)[[group_term]][1:p,1:p]

Issue arose with:

m <- lmer(DV ~ P + P:H + (1+P||id), data = data)

No data was given, so an equivalent test case should be:

fm1 <- lmer(Reaction ~ Days + (1+Days || Subject), data = sleepstudy)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions