bsm.simple {msos} | R Documentation |
Helper function to determine
estimates for MLE regression.
Description
Generates estimates for MLE using a conditioning approach.
Usage
bsm.simple(x, y, z)
Arguments
x |
An |
y |
The |
z |
A |
Details
The technique used to calculate the estimates is described in section 9.3.3.
Value
A list with the following components:
- Beta
The least-squares estimate of
.
- SE
The
matrix with the
th element being the standard error of
.
- T
The
matrix with the
th element being the t-statistic based on
.
- Covbeta
The estimated covariance matrix of the
's.
- df
A
-dimensional vector of the degrees of freedom for the
-statistics, where the
th component contains the degrees of freedom for the
th column of
.
- Sigmaz
The
matrix
.
- Cx
The
residual sum of squares and crossproducts matrix.
See Also
bothsidesmodel.mle
and bsm.fit
Examples
# Taken from section 9.3.3 to show equivalence to methods.
data(mouths)
x <- cbind(1, mouths[, 5])
y <- mouths[, 1:4]
z <- cbind(1, c(-3, -1, 1, 3), c(-1, 1, 1, -1), c(-1, 3, -3, 1))
yz <- y %*% solve(t(z))
yza <- yz[, 1:2]
xyzb <- cbind(x, yz[, 3:4])
lm(yza ~ xyzb - 1)
bsm.simple(xyzb, yza, diag(2))