bothsidesmodel {msos} | R Documentation |
Calculate the least squares estimates
Description
This function fits the model using least squares. It takes an optional
pattern matrix P as in (6.51), which specifies which \beta _{ij}
's are
zero.
Usage
bothsidesmodel(x, y, z = diag(qq), pattern = matrix(1, nrow = p, ncol = l))
Arguments
x |
An |
y |
The |
z |
A |
pattern |
An optional |
Value
A list with the following components:
- Beta
The least-squares estimate of
\beta
.- SE
The
P \times L
matrix with theij
th element being the standard error of\hat{\beta}_ij
.- T
The
P \times L
matrix with theij
th element being thet
-statistic based on\hat{\beta}_{ij}
.- Covbeta
The estimated covariance matrix of the
\hat{\beta}_{ij}
's.- df
A
p
-dimensional vector of the degrees of freedom for thet
-statistics, where thej
th component contains the degrees of freedom for thej
th column of\hat{\beta}
.- Sigmaz
The
Q \times Q
matrix\hat{\Sigma}_z
.- Cx
The
Q \times Q
residual sum of squares and crossproducts matrix.
See Also
bothsidesmodel.chisquare
, bothsidesmodel.df
,
bothsidesmodel.hotelling
, bothsidesmodel.lrt
,
and bothsidesmodel.mle
.
Examples
# Mouth Size Example from 6.4.1
data(mouths)
x <- cbind(1, mouths[, 5])
y <- mouths[, 1:4]
z <- cbind(c(1, 1, 1, 1), c(-3, -1, 1, 3), c(1, -1, -1, 1), c(-1, 3, -3, 1))
bothsidesmodel(x, y, z)