p.post.found: computes the posterior probability of observations of a...

Description Usage Arguments Value References Examples

View source: R/p.post.found.R

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

1
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 n times K+1 given the density of measurements of each individual if allocated to class k, where n is the number of individuals and K is the total number of latent classes in the model,

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

 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 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)

abureau/LCAextend documentation built on May 3, 2019, 9:41 p.m.