marginality {dae} | R Documentation |

## Extracts the marginality matrix (matrices) from a `pstructure.object`

or a `pcanon.object`

.

### Description

Produces (i) a marginality `matrix`

for the `formula`

in a call to
`pstructure.formula`

or (ii) a `list`

containing the marginlity matrices, one for each
`formula`

in the `formulae`

argument of a call to
`designAnatomy`

.

A marginality matrix for a set of terms is a square `matrix`

with
a row and a column for each ternon-aliased term. Its elements are zeroes and ones,
the entry in the ith row and jth column indicates whether or not the ith term is
marginal to the jth term i.e. the column space of the ith term is a subspace of
that for the jth term and so the source for the jth term will be orthogonal to
that for the ith term.

### Usage

```
## S3 method for class 'pstructure'
marginality(object, ...)
## S3 method for class 'pcanon'
marginality(object, ...)
```

### Arguments

`object` |
A |

`...` |
Further arguments passed to or from other methods. Unused at present. |

### Value

If `object`

is a `pstructure.object`

then a `matrix`

containing
the marginality matrix for the terms obtained from the `formuula`

in the call to
`pstructure.formula`

.

If `object`

is a `pcanon.object`

then a `list`

with a
component for each `formula`

, each component having a marginality matrix that
corresponds to one of the formulae in the call to `designAnatomy`

. The
components of the `list`

will have the same names as the componeents of the
`formulae`

`list`

and so will be unnamed if the components of the latter
`list`

are unnamed.

### Author(s)

Chris Brien

### See Also

`pstructure.formula`

, `designAnatomy`

, `summary.pcanon`

, `proj2.efficiency`

, `proj2.combine`

, `proj2.eigen`

,

`pstructure`

in package dae,
`eigen`

.

`projector`

for further information about this class.

### Examples

```
## PBIBD(2) from p. 379 of Cochran and Cox (1957) Experimental Designs.
## 2nd edn Wiley, New York
PBIBD2.unit <- list(Block = 6, Unit = 4)
PBIBD2.nest <- list(Unit = "Block")
trt <- factor(c(1,4,2,5, 2,5,3,6, 3,6,1,4, 4,1,5,2, 5,2,6,3, 6,3,4,1))
PBIBD2.lay <- designRandomize(allocated = trt,
recipient = PBIBD2.unit,
nested.recipients = PBIBD2.nest)
##obtain pstructure.object and extract marginality matrix
unit.struct <- pstructure(~ Block/Unit, data = PBIBD2.lay)
unit.marg <- marginality(unit.struct)
##obtain combined decomposition and extract marginality matrices
unit.trt.canon <- designAnatomy(list(unit=~ Block/Unit, trt=~ trt), data = PBIBD2.lay)
marg <- marginality(unit.trt.canon)
```

*dae*version 3.2.28 Index]