pitakakariki / simr

Power Analysis of Generalised Linear Mixed Models by Simulation
70 stars 20 forks source link

Sanity checks for modify #34

Open pitakakariki opened 8 years ago

pitakakariki commented 8 years ago

There aren't enough guardrails in modify.R. e.g.

fm <- lmer(y ~ x + (1|g), data=simdata)
fixef(fm) <- 3
fixef(fm)

gives

Error in structure(object@beta, names = dimnames(X)[[2]]) : 
  'names' attribute [2] must be the same length as the vector [1]
pitakakariki commented 4 years ago

Add docs for fixef<- with factors, i.e. need to specify each level.