change_enames {lazy.sasef}R Documentation

Change effect names of the design matrix


Change effect names of the design matrix


change_enames(obj = NULL, pattern = "a", print = 0)



A design object


Th pattern of column naming:
"A", "a", "Aa", "aA", "AA", or "aa"


= 1 to print the result


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

X is the design matrix
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.


A list of X and info with new effect names


# generate various types of design matrices
res0 <- design_mat( levels=c(2:3), type=0 )
res10 <- design_mat( levels=c(2:3), type=1 )
res10 <- change_enames( res10, pattern="a", print=1)
res11 <- design_mat( levels=c(2:3), type=1, drop="first" )
res11 <- change_enames( res11, pattern="Aa", print=1)
resnf <- design_mat( levels=c(2:3), type=-1 )
resnf <- change_enames( resnf, pattern="aA", print=1)

[Package lazy.sasef version 0.1.2 Index]