Learn R Programming

msos (version 1.2.0)

bsm.simple: Helper function to determine \(\beta\) estimates for MLE regression.

Description

Generates \(\beta\) estimates for MLE using a conditioning approach.

Usage

bsm.simple(x, y, z)

Arguments

x

An \(N \times (P + F)\) design matrix, where \(F\) is the number of columns conditioned on. This is equivalent to the multiplication of \(xyzb\).

y

The \(N \times (Q - F)\) matrix of observations, where \(F\) is the number of columns conditioned on. This is equivalent to the multiplication of \(Yz_a\).

z

A \((Q - F) \times L\) design matrix, where \(F\) is the number of columns conditioned on.

Value

A list with the following components:

Beta

The least-squares estimate of \(\beta\).

SE

The \((P + F) \times L\) matrix with the \(ij\)th element being the standard error of \(\hat{\beta}_ij\).

T

The \((P + F) \times L\) matrix with the \(ij\)th element being the t-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 the \(t\)-statistics, where the \(j\)th component contains the degrees of freedom for the \(j\)th column of \(\hat{\beta}\).

Sigmaz

The \((Q - F) \times (Q - F)\) matrix \(\hat{\Sigma}_z\).

Cx

The \(Q \times Q\) residual sum of squares and crossproducts matrix.

Details

The technique used to calculate the estimates is described in section 9.3.3.

See Also

bothsidesmodel.mle and bsm.fit

Examples

Run this code
# NOT RUN {
# 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))
# }

Run the code above in your browser using DataLab