p.post.found {LCAextend} | R Documentation |
computes the posterior probability of observations of a founder
Description
computes the posterior probability of measurements of a founder for each class and each symptom status of the founder. This is an internal function not meant to be called by the user.
Usage
p.post.found(found, status, probs, fyc)
Arguments
found |
a founder in the pedigree (individual without parents in the pedigree), |
status |
the symptom status vector of the whole pedigree, |
probs |
a list of all probability parameters of the model, |
fyc |
a matrix of |
Value
the function returns p.found
a matrix of 2 times K+1
entries: p.found[s,k]
is the posterior probability of the observations Y_found
under status S_found=s
and when he is assigned to class k
.
References
TAYEB et al.: Solving Genetic Heterogeneity in Extended Families by Identifying Sub-types of Complex Diseases. Computational Statistics, 2001, DOI: 10.1007/s00180-010-0224-2.
Examples
#data
data(ped.cont)
fam <- ped.cont[,1]
dad <- ped.cont[fam==1,3]
status <- ped.cont[fam==1,6]
y <- ped.cont[fam==1,7:ncol(ped.cont)]
#a founder
found <- which(dad==0)[1]
data(probs)
data(param.cont)
#densities of the observations
fyc <- matrix(1,nrow=nrow(y),ncol=length(probs$p)+1)
fyc[status==2,1:length(probs$p)] <- t(apply(y[status==2,],1,dens.norm,
param.cont,NULL))
#the function
p.post.found(found,status,probs,fyc)