itemlist {hassediagrams}R Documentation

Objects to be used for restricted layout structure Hasse diagram

Description

Returns an object of class "rls" that contains the structural objects of the layout structure. The output can be used in a consecutive function to generate the Hasse diagram of the restricted layout structure of the experimental design.

Usage

itemlist(datadesign, randomfacsid = NULL)

Arguments

datadesign

A data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables/factors in the experimental design. The dataframe should only include the variables/factors/columns that the user wants to evaluate in the consecutive hasserls function to generate the Hasse diagram of the restricted layout structure.

randomfacsid

An optional vector specifying whether the factors are defined as fixed (entry = 0) or random (entry = 1). The default choice is NULL and the function automatically sets all entries to 0. The length of the vector should be equal to the number of variables/factors in the design, i.e., the length of the vector should be equal to the number of columns of the argument datadesign.

Details

The function requires a dataframe containing the variables corresponding to the experimental factors only (i.e., no response variables). Using the randomfacsid argument, the factors and generalised factors that correspond to random effects can be identified.

Value

The function returns an object of class "rls" which is a list with the following components:

design - The design dataframe containing all of the factors present in the layout structure. This is identical to the input argument datadesign.

finaleffectsnames - A character vector consisting of all structural objects (factors and generalised factors) in the layout structure.

finalstructure - A table that shows the relationships between the structural objects in the layout structure.

finaleffects - A vector containing the final factor orders.

finalrandomeffects - A vector containing 0 or 1 entries for factors or generalised factors corresponding to fixed (entry = 0) or random (entry = 1) effects.

confoundings - Defines the equivalent factors and generalised factors.

nfactors - The number of factors/variables of the design dataframe.

outputlistip1 - A list of items required to generate the restricted layout structure.

nestednames - List of matrices containing the nested version of the factor and generalised factor names.

TransferObject - A Nx2 matrix where N equals the total number of structural objects. The first column contains the structural objects in the layout structure, and the second column has "Mean" for the first entry and "NULL" for the remaining entries.

Author(s)

Damianos Michaelides, Simon Bate, and Marion Chatfield

References

Bate, S.T. and Chatfield, M.J. (2016a), Identifying the structure of the experimental design. Journal of Quality Technology, 48, 343-364.

Bate, S.T. and Chatfield, M.J. (2016b), Using the structure of the experimental design and the randomization to construct a mixed model. Journal of Quality Technology, 48, 365-387.

Box, G.E.P., Hunter, J.S., and Hunter, W.G., (1978), Statistics for Experimenters. Wiley.

Joshi, D.D. (1987), Linear Estimation and Design of Experiments. Wiley Eastern, New Delhi.

Williams, E.R., Matheson, A.C. and Harwood, C.E. (2002), Experimental design and analysis for tree improvement. 2nd edition. CSIRO, Melbourne, Australia.

Examples


# Examples using built-in data: concrete, dental, human, analytical

# Fractional factorial design for asphalt concrete production
concrete_objects <- itemlist(datadesign=concrete)
print(concrete_objects)

# Crossover design for a dental study
dental_objects <- itemlist(datadesign=dental, randomfacsid=c(0,1,0,0,0))
summary(dental_objects)

# Block design for an experiment assessing human-computer interaction
human_objects <- itemlist(datadesign=human, randomfacsid=c(1,1,0,0,0,0,1))
print(human_objects)

# Cross-nested design for an analytical method investigation
analytical_objects <- itemlist(datadesign=analytical, 
                               randomfacsid=c(0,0,1,1,1,0,0,0))
summary(analytical_objects)

# Examples using data from the dae package (conditionally loaded)
if (requireNamespace("dae", quietly = TRUE)) {
  data(BIBDWheat.dat, package = "dae")
  BIBDWheat <- BIBDWheat.dat[, -4]
  BIBDWheat$Plots <- c(1:30)
  BIBDWheat_objects <- itemlist(datadesign=BIBDWheat)
  print(BIBDWheat_objects)
}



[Package hassediagrams version 1.0 Index]