Learn R Programming

HDANOVA (version 0.8.3)

model.frame.asca: Model Frame and Model Matrix for ASCA-like Models

Description

Extraction functions to retrieve the model.frame and model.matrix of an asca object.

Usage

# S3 method for asca
model.frame(formula, ...)

# S3 method for asca model.matrix(object, ...)

Value

A data.frame or matrix object.

Arguments

formula

The asca object.

...

Not implemented

object

The asca object.

Examples

Run this code
# Load candies data
data(candies)

# Basic ASCA model with two factors
mod <- asca(assessment ~ candy + assessor, data=candies)

# Extract model frame and model matrix
mf <- model.frame(mod)
head(mf)
mm <- model.matrix(mod)
par.old <- par(mar=c(3,3,3,1), mgp=c(1,0.7,0))
image(t(mm[seq(165,1,-1),]), main="Model Matrix", xlab="dummy values", ylab="samples",
     axes=FALSE)
par(par.old)

Run the code above in your browser using DataLab