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

bsm.fit(x, y, z, pattern)

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.

pattern

An optional \(N-F x F\) matrix of 0's and 1's indicating which elements of \(\beta\) are allowed to be nonzero.

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.

Examples

# NA