Learn R Programming

saeRobust (version 0.5.0)

variance: Construct variance

Description

A generic function to construct the different variance components of an object. You may want to use this in conjunction with bootstrap.

Usage

variance(.object, ...)

# S3 method for fitrfh variance(.object, ...)

# S3 method for fitrsfh variance(.object, ...)

# S3 method for fitrtfh variance(.object, ...)

# S3 method for fitrstfh variance(.object, ...)

# S3 method for fitrfh weights(object, c = 1, ...)

Arguments

.object, object

an object

...

arguments passed to method

c

(numeric) scalar

Examples

Run this code
data("grapes", package = "sae")
data("grapesprox", package = "sae")

fitRFH <- rfh(
  grapehect ~ area + workdays - 1,
  data = grapes,
  samplingVar = "var"
)

# The variance component of a mixed linear model:
matV <- variance(fitRFH)
# The full variance matrix:
matV$V()

# The sampling error component
matV$Ve()

# the random effects component
matV$Vu()

Run the code above in your browser using DataLab