The Essential R Reference by Mark Gardener

The Essential R Reference by Mark Gardener

Author:Mark Gardener
Language: eng
Format: epub, pdf
Publisher: Wiley Publishing, Inc.
Published: 2012-10-23T04:00:00+00:00


Common Usage

contrasts(x, contrasts = TRUE, sparse = FALSE) contrasts(x, how.many) <- value C(object, contr, how.many, ...) contr.helmert(n, contrasts = TRUE, sparse = FALSE) contr.poly(n, scores = 1:n, contrasts = TRUE, sparse = FALSE) contr.sum(n, contrasts = TRUE, sparse = FALSE) contr.treatment(n, base = 1, contrasts = TRUE, sparse = FALSE) contr.SAS(n, contrasts = TRUE, sparse = FALSE)

Related Commands

aov

lm

glm

Command Parameters

x A factor or logical variable.

contrasts = TRUE If contrasts = FALSE, an identity matrix is returned. If contrasts = TRUE, the contrasts are returned from the current contrasts option. The parameter is ignored if x is a matrix with a contrasts attribute.

sparse = FALSE If TRUE, a sparse matrix is returned.

how.many The number of contrasts to create; defaults to one less than the number of levels in x.

object A factor (can be ordered).

contr Which contrasts to use. This can be given as a matrix with one row for each level of the factor or a suitable function like contr.xxxx or a character string giving the name of the function.

... Additional parameters to pass to contr.xxxx.

n A vector of levels for a factor or the number of levels required.

scores = 1:n The set of values over which orthogonal polynomials are to be computed.

base An integer specifying which group is considered the baseline group. Ignored if contrasts is FALSE.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.