fitVCA: Fit Variance Component Model by ANOVA or REML

View source: R/vca.R

fitVCAR Documentation

Fit Variance Component Model by ANOVA or REML

Description

Function serves as interface to functions anovaVCA and remlVCA for fitting a variance component models (random models) either by ANOVA or REML. All arguments applicable to either one of these functions can be specified (see anovaVCA or remlVCA for details).

Usage

fitVCA(
  form,
  Data,
  method = c("anova", "reml"),
  scale = TRUE,
  VarVC = TRUE,
  ...
)

Arguments

form

(formula) specifiying the variance component model (see anovaVCA and/or remlVCA)

Data

(data.frame) containing all variables referenced in 'form'

method

(character) either "anova" to use ANOVA Type-I estimation of variance components or "reml" to use restricted maximum likelihood (REML) estimation of variance component

scale

(logical) TRUE = scale values of the response aiming to avoid numerical problems when numbers are either very small or very large, FALSE = use original scale

VarVC

(logical) TRUE = variance-covariance matrix of variance components will be computed, FALSE = it will not be computed

...

additional arguments to be passed to function anovaVCA or function remlVCA.

Author(s)

Andre Schuetzenmeister andre.schuetzenmeister@roche.com

See Also

fitLMM, anovaVCA, remlVCA

Examples

## Not run: 
#load data (CLSI EP05-A2 Within-Lab Precision Experiment) 
data(dataEP05A2_2)

# perform ANOVA-estimation of variance components
res.anova <- fitVCA(y~day/run, dataEP05A2_2, "anova")
# perform REML-estimation of variance components
res.reml <- fitVCA(y~day/run, dataEP05A2_2, "reml")

# compare scaling vs. not scaling the response
fit0 <- fitVCA(y~day/run, dataEP05A2_2, "anova", scale=TRUE)
fit1 <- fitVCA(y~day/run, dataEP05A2_2, "anova", scale=FALSE)

## End(Not run)

VCA documentation built on Sept. 7, 2022, 5:07 p.m.