Learn R Programming

planor (version 1.5-3)

planor.harmonize: Harmonize the Factors

Description

Harmonize the factors originating from a list of factors, a list of models, and a list of basic factors (this function is essentially for internal use).

Usage

planor.harmonize(factors, nlevels, ordered, hierarchy, model, estimate,
    listofmodels, base)

Arguments

factors

an object of class '>designfactors, typically an output from planor.factors). Otherwise the arguments factors, nlevels, ordered, hierarchy follow the syntax of planor.factors.

nlevels

see planor.factors. Ignored if factors is of class '>designfactors.

ordered

see planor.factors. Ignored if factors is of class '>designfactors.

hierarchy

see planor.factors. Ignored if factors is an object of class '>designfactors.

model

a list of model-estimate pairs of formulae, typically an output from planor.model. Otherwise the arguments model, estimate and listofmodels follow the syntax of planor.model.

estimate

see planor.model. Ignored if model is a list.

listofmodels

see planor.model. Ignored if model is a list.

base

an optional formula to specify the basic factors. These factors must belong to the factors argument

Value

An object of class '>designfactors very similar to factors, but with two additional logical columns in slots fact.info and pseudo.info: - model (TRUE for the factors present in at least one model formula), - basic (TRUE for the basic factors).

Examples

Run this code
# NOT RUN {
F2 <- planor.factors(factors=c("block",LETTERS[1:4]), nlevels=c(6,6,6,4,2))
M2 <- planor.model( model=~block+(A+B+C)^2, estimate=~A+B+C )
F2.h <- planor.harmonize(factors=F2, model=M2, base=~A+B)
names(F2)
names(F2.h)
# }

Run the code above in your browser using DataLab