get_design_info {lazy.sasef}R Documentation

Get various information of the design matrix

Description

Get various information of the design matrix

Usage

get_design_info(obj, effect = NULL, item = NULL)

Arguments

obj

A design object which is a list of the design matrix X and infomation list info.

effect

name of the effect whose info is needed.
effect is a string such as "A", "AB" or "BCD".

item

name of the item whose info is needed.
item is one of: "ename", "order", "elevels", "range", "menum", "contained", or "contains"

Details

A design object is a list of the design matrix (X), infomation list (info) and parameter list (param) where

X is the design matrix
and
info is a list whose length is the number of effects.

info[[i]] contains the following:
ename name of effect[i]
order order of effect[i]: 0, 1, ..., maxorder
elevels # of levels of effect[i]
df degrees of freedom of effect[i]
erange range of effect[i] in the (full rank) estimable functions
range=cbind(from,to) where
from is the starting independent colmn of effect[i] in X
to is the ending independent column of effect[i] in X
rangef=cbind(from,to) where
from is the starting colmn of effect[i] in X
to is the ending column of effect[i] in X
menum vector of main effect number involved in effect[i] contained vector of effect numbers which contains effect[i]
where effect number is defined according to the order of column of X.
contains vector of effects which effect[i] contais.
param is a list consisting of

type, drop, maxorder, sort, pattern

Information of estimable function may be added to this object later.

Value

A vector or list of information requested

Examples

levels <- c(2,3,2)
ll <- lapply( levels,function(x) seq(1:x) )
data <- cprod(ll); data <- rbind(data,c(1,1,1))
rownames(data) <- 1:nrow(data); colnames(data)=c("A","B","C")
res1 <- design_mat( data )
res2 <- design_mat( data, sort=1 )

get_design_info( res1, effect="AB" )
get_design_info( res1, effect="AB", item="menum" )
get_design_info( res1, item="range" )
get_design_info( res2, item="contained" )


[Package lazy.sasef version 0.1.4 Index]