Description Usage Arguments Details Value Examples
View source: R/optim.gene.norm.R
Estimates the mean
mu
and parameters of the variance-covariance matrix
sigma
of a multinormal distribution for the measurements with
general variance-covariance matrices distinct for each class.
1 | optim.gene.norm(y, status, weight, param, x = NULL, var.list = NULL)
|
y |
a matrix of continuous measurements (only for symptomatic subjects), |
status |
symptom status of all individuals, |
weight |
a matrix of |
param |
a list of measurement density parameters, here is a list of |
x |
a matrix of covariates (optional). Default id |
var.list |
a list of integers indicating which covariates (taken from |
The values of explicit estimators are computed for both mu
and
sigma
. This is the general case, the variance-covariance
matrices sigma
of the different classes are distinct and
unconstrained. Treatment of covariates is not yet implemented, and any
provided covariate value will be ignored.
The function returns a list of estimated parameters param
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #data
data(ped.cont)
status <- ped.cont[,6]
y <- ped.cont[,7:ncol(ped.cont)]
data(peel)
#probs and param
data(probs)
data(param.cont)
#e step
weight <- e.step(ped.cont,probs,param.cont,dens.norm,peel,x=NULL,
var.list=NULL,famdep=TRUE)$w
weight <- matrix(weight[,1,1:length(probs$p)],nrow=nrow(ped.cont),
ncol=length(probs$p))
#the function
optim.gene.norm(y[status==2,],status,weight,param.cont,x=NULL,
var.list=NULL)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.