Skip to content

when lme() model contain a categorical variable, coefs() won't run properly #318

@iisnot

Description

@iisnot

when lme() model contain a categorical variable, coefs() won't run properly

here is the sample code for repetition in version 2.3.0.1

library(dplyr)
library(nlme)

iris = iris |> 
  mutate(Category2 = as.character(round(Sepal.Length,0)))
mod1 = lme(Sepal.Width ~ Petal.Length + Petal.Width + Category2, 
           random = ~1|Species, data = iris)
mod2 = psem(mod1)
summary(mod2)

it will return if (random) {conditions >1

i think this is caused by the function model.frame(), it pass data to random

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions