lmfitSaws | R Documentation |
This is a very basic linear model function. It outputs only the objects needed for input into saws
.
lmfitSaws(x,y)
x |
design matrix |
y |
response vector |
The saws
function requires three inputs, the parameter estimates (coefficients),
u, and omega. The value u is the K by p matrix of estimating equations evaluated at the coefficient,
where each row is an independent estimating
equation. For the linear model u[i,] = x[i,] * residual[i]. The value omega is a K by p by p array, where
omega[i,,] is the derivative of the ith estimating equation with respect to the parameter vector. For the linear
model omega[i,,]= t(Xi)
A list with the following elements
coefficients |
p by 1 coefficient vector |
u |
K by p matrix of estimating equations |
omega |
K by p by p array, see details |
M.P. Fay
Fay and Graubard (2001). Small-Sample Adjustments for Wald-Type Tests Using Sandwich Estimators. Biometrics 57: 1198-1206. (for copy see /inst/doc/ directory
link{lm}
set.seed(1) n<-20 x1<-rnorm(n) x2<-factor(c(rep("a",n/2),rep("b",n/2))) y<-rnorm(n,x1) out<-lmfitSaws(model.matrix(~x1*x2),y) saws(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.