Ddf | R Documentation |
The Hessian of the normal-theory observed data log-likelihood function, evaluated at a given value of the mean vector and the covariance matrix, when data are incomplete. The output is a symmetric matrix with rows/columns corresponding to elements in the mean vector and lower diagonal of the covariance matrix.
Ddf(data, mu, sig)
data |
A matrix consisting of at least two columns. Values must be numerical with missing data indicated by NA. |
mu |
A row matrix consisting of the values of the mean at which points the Hessian of the log-likelihood is to be computed. |
sig |
A symmetric covariance matrix at at which points the Hessian of the log-likelihood is to be computed. |
While mu is a vector, it has to be input as a matrix object. See example nelow.
dd |
The resulting Hessian matrix |
se |
Negative of the inverse of the Hessian matrix |
There must be no rows in data that contain no observations.
Mortaza Jamshidian, Siavash Jalal, and Camden Jansen
Jamshidian, M. and Bentler, P. M. (1999). “ML estimation of mean and covariance structures with missing data using complete data routines.” Journal of Educational and Behavioral Statistics, 24, 21-41, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/1165260")}.
set.seed <- 50
n <- 200
p <- 4
pctmiss <- 0.2
y <- matrix(rnorm(n * p),nrow = n)
missing <- matrix(runif(n * p), nrow = n) < pctmiss
y[missing] <- NA
mu <- c(0,0,0,0)
sig <- matrix(c(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1),4,4)
Ddf(data=y, as.matrix(mu), sig)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.