designDiagram-class {LabApplStat}R Documentation

The designDiagram class and some basic methods

Description

Objects of class designDiagram as generated by DD is a list with entries as specified below.

response

Logical stating whether a response variable was present.

terms

Named vector with all terms in the design.

random.terms

Vector with the random terms in the design.

relations

Named matrix with relations between variables with the following interpretation: "0"=linear indepent, "<"=row term is a subspace of column, "<-"=row term is a subspace of column term and no other terms are inbetween, ">" and "->" the similar interpretatioin between columns and rows, name=name of minimum between row and column term.

inner

Named matrix of squared inner products of subspaces with nesting subspaces removed. Rounded at order of eps in the call to link{DD}. Used to decide orthogonality of the design.

Nparm

Named vector with the number of parameters for the terms.

df

Named vector with the degrees of freedom for the terms.

SS

Named matrix with Sum-of-Squares if a response variable was specified.

MSS

Named matrix with Mean-Sum-of-Squares if a response variable was specified.

pvalue

Named matrix with p-values for Type-I F-tests. p-values are stated at the collapsed nesting, but F-test are done against the most coarse nested random effect.

sigma2

Named vector of random effects variance estimates.

varcov

Named list of variance-covariance matrix for fixed effects relative to each of the random effects. Rounded at order of eps.

coordinates

Data frame with node coordinates of the terms. Initialized in Sugiyama layout.

Usage

## S3 method for class 'designDiagram'
print(x, ...)

## S3 method for class 'designDiagram'
summary(object, ...)

## S3 method for class 'designDiagram'
update(object, ...)

## S3 method for class 'designDiagram'
plot(
  x,
  circle = "none",
  pvalue = (circle == "MSS"),
  sigma2 = NULL,
  kill = ~1,
  ca = FALSE,
  max.area = NULL,
  relative = 0.01,
  color = NULL,
  circle.scaling = 1,
  arrow.type = arrow(angle = 20, length = unit(4, "mm")),
  xlim = c(0, 1),
  ylim = c(0, 1),
  horizontal = TRUE,
  ...
)

Arguments

x

object of class designDiagram

...

not used.

object

object of class designDiagram

circle

character specifying which circles to draw at the terms: "none"=no circles, "SS"=a circle with area proportional to the associated Sum-of-Squares, "MSS"=a circle with area proportional to the associated Mean-Sum-of-Squares, "I"=a circle with area proportional to average information, "I2"=a circle with area proportional to average information of the parameter contrasts. Defaults to "none".

pvalue

boolean specifying whether p-values should be inserted on the graphs. This is only possible if a response variable was specified. Defaults to TRUE is circle="MSS" and FALSE otherwise.

sigma2

vector of random effects variances. Defaults to NULL, in which case the estimates are used (if present), otherwise all variances are set to 1.

kill

formula specifying which cirlces not to plot. Defaults to ~1 corresponding to not plotting the intercept term (that otherwise may overweight the remaining terms).

ca

boolean deciding whether collinearity analysis is visualized. If NULL then set TRUE for non-orthogonal designs, and to FALSE for orthogonal designs. Defaults to FALSE.

max.area

numeric specifying the used maximal area of circles. If NULL then max.area is derived from SS, MSS or I according to value of circle. Defaults to NULL.

relative

positive numeric, which specifies needed relative increase for an area to be visualized in the collinearity analysis. Defaults to 0.01.

color

color of circles when ca=FALSE. Defaults to NULL corresponding to preassigned choice of colors (see details below).

circle.scaling

numeric specifying size scaling of circles. Defaults to 1, which corresponds to the largest circle having a radius that is half of the shortest distance between two nodes.

arrow.type

specifying arrow heads via arrow. Defaults to arrow(angle=20,length=unit(4,"mm")).

xlim

x-range of diagram plot. Defaults to c(0,1).

ylim

y-range of diagram plot. Defaults to c(0,1).

horizontal

boolean specifying if the design diagram should be drawn horizontally or vertically. Defaults to TRUE.

Details

For plot.designDiagram the options circle="SS" and circle="MSS" are only available if a response variable was specified for the design. For circle="I" and circle="I2" the color of the circles visualize the coefficient of variation of the informations. For the computation of the informations the variances of the random effects are either estimated (if a response variable is present), all set to 1 (otherwise), or given via the option sigma2.

If color=NULL and ca=FALSE, then the defaults colors are "lightgreen" for Sum-of-Squares, "lightblue" for Mean-Sum-of-Squares, and a gradient from "limegreen" to "orange" for information spread. To specify a different color gradient in the latter case, then give a vector of two colors.

For update.designDiagram the second argument should be a data frame with new coordinates. This can be usefull for manually setting the coordinates for plotting.

See Also

DD


[Package LabApplStat version 1.4.4 Index]