Description Usage Arguments Value References Examples
computes the posterior probability of measurements of a child for each class and each symptom status of the subject given the classes of both of his parents. This is an internal function not meant to be called by the user.
1 | p.post.child(child, c.connect, c.spouse, status, probs, fyc)
|
child |
a child in the pedigree, |
c.connect |
the class of one parent (who is a connector) of the child, |
c.spouse |
the class of the other parent of the child, |
status |
the symptom status vector of the whole pedigree, |
probs |
a list of all probability parameters of the model, |
fyc |
a matrix of |
the function returns p.child
a matrix of 2 times K+1
entries such that p.child[s,k]
is the posterior probability of the measurements Y_child
under status S_child=s
and when he is assigned to class k
and his parents are assigned to classes c.connect
and c.spouse
.
TAYEB et al.: Solving Genetic Heterogeneity in Extended Families by Identifying Sub-types of Complex Diseases. Computational Statistics, 2011, DOI: 10.1007/s00180-010-0224-2.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #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 child
child <- 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.child(child,c.connect=1,c.spouse=3,status,probs,fyc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.