Learn R Programming

lavaSearch2 (version 1.0.0)

summary: Summary with Small Sample Correction

Description

Summary with small sample correction.

Usage

# S3 method for gls2
summary(object, digit = max(3, getOption("digit")),
  adjust.residuals = TRUE, ...)

# S3 method for lme2 summary(object, digit = max(3, getOption("digit")), adjust.residuals = TRUE, ...)

# S3 method for lvmfit2 summary(object, adjust.residuals = FALSE, ...)

Arguments

object

a gls, lme or lvm object.

digit

the number of digit to keep when diplaying the summary.

adjust.residuals

Small sample correction: should the leverage-adjusted residuals be used to compute the score? Otherwise the raw residuals will be used.

...

arguments passed to lower level methods.

Examples

Run this code
# NOT RUN {
m <- lvm(Y~X1+X2)
set.seed(10)
d <- sim(m, 2e1)

## Gold standard
summary(lm(Y~X1+X2, d))$coef

## gls models
library(nlme)
e.gls <- gls(Y~X1+X2, data = d, method = "ML")
summary(e.gls)$tTable
dVcov2(e.gls, cluster = 1:NROW(d)) <- FALSE ## no small sample correction
summary(e.gls)$tTable

dVcov2(e.gls, cluster = 1:NROW(d)) <- TRUE ## small sample correction
summary(e.gls)$tTable

## lvm models
e.lvm <- estimate(m, data = d)
summary(e.lvm)$coef
dVcov2(e.lvm) <- FALSE ## no small sample correction
summary(e.lvm)$coef

dVcov2(e.lvm) <- TRUE ## small sample correction
summary(e.lvm)$coef

# }

Run the code above in your browser using DataLab