block2lme | R Documentation |
Put block in lme-compatible format
block2lme(block, ...)
## S3 method for class 'list'
block2lme(block, verbose = TRUE, ...)
## S3 method for class 'formula'
block2lme(block, verbose = TRUE, ...)
## S3 method for class 'character'
block2lme(block, verbose = TRUE, ...)
formula2lmer(formula, block)
formula2lm(formula, block)
block_vars(formula)
block |
block: charactervector or formula |
... |
required for s3 dispatch |
verbose |
TRUE or FALSE |
formula |
formula |
# lme: ensure lme-compatiblae block specification
block2lme( block = list(subject = ~1, batch = ~1))
block2lme( block = ~1|subject)
block2lme( block = c('subject', 'batch'))
# lm: integrate block into formula as random effect
formula2lm( formula = ~ subgroup, block = c('subject', 'batch') )
# lmer: integrate block into formula as fixed effect
formula2lmer( formula = ~ subgroup, block = c('subject', 'batch') )
formula2lmer( formula = ~ subgroup + (1|subject) + (1|batch ) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.