mcmc.risksets2 {BAMSE}R Documentation

This function performs clustering of the risk sets

Description

The algorithm identifies the components in the risk sets that are frequently sampled and adds more components and clusters risk sets together with these components. The algorith keeps adding components until the joint posterior for the cluster of risk sets get below a specified threshold

Usage

mcmc.risksets2(mcmc, thres = 0.1, file = paste(mcmc$name,
                 "risksets.txt", sep = ""), change = NULL, change_from
                 = NULL, change_to = NULL, max_risksets = 50, rm.empty
                 = T, rm.empty.riskset0 = F, rm.no.parameters = T,
                 min.nr.in.riskset = 1, return = F, env.integer = T,
                 burnin = 0, log = F, latex = F, change_all = NULL,
                 strict = F)

Arguments

mcmc an mcmc object
thres The threshold for the minimum posterior for each risk sets. A low threshold will give many clusters.
file A filename (for saving the results)
change a vektor of component numbers (integers) that manually changes the state of a component (see details)
change_from a vektor of component states that will be change (see details)
change_to a vektor of component states that the states in change_from should be changed to (see details)
max_risksets Integer. The maximum number of clusters
rm.empty Boolean. If TRUE the sampled risk sets that does not partition the individuals are removed
rm.empty.riskset0 Boolean. If TRUE all the sampled risk sets in an iteration where all the individuals are placed in a risk set are removed
rm.no.parameters NA
min.nr.in.riskset Integer. The minimum number of individuals in a risk group. If rm.empty is TRUE risk sets that give rise to risk groups with less than this number of individuals will be removed. This can be handly if there are som extreme outliers in the data that are of little interest
return Boolean. It TRUE the result is returned
env.integer NA
burnin Integer. The burnin of the chain
log Boolean. If the trait was transformed using the logarithm the results can be transformed back
latex print latex file
change_all change all
strict strict

Details

Manually merging component states: Sometimes different states of the components will partition the data in the same way and these can be manually merged. For example if there are only a few homozygotes for the minor allele then the state that allows only heterozygotes and the state that allows both heterozygotes and homozygotes (for the minor allele) will partition the data in the same way. There these can manually merged. The states for the SNP components are given as 1: WT (homozygote for the major allele), 2: HE (heterozygote), 3: HO (homozygote for the minor allele), 5: WT or HE, 6: HE or HO, 7: WT or HO. If there are only a few homozygotes for the minor allele I suggest merging state 2 and 6. e.g. for SNP 5 and 6: change=c(5,6),change_from=c(2,2),change_to=c(6,6)

Value

short.table the clusters of risk sets
nr the 90 % credibility interval (CI)for the number of individuals
adj_mean The mean and 90% CI for the means of the risk sets. If any adjustment factors were included in the MCMC run the mean is adjusted
post The number of sampled risk sets with these components (e.g. alleles or environmental factors) divided by the number of iterations (this in not a real posterior probability)
post.only The number of sampled risk sets with these components and no other components divided by the number of iterations (this in not a real posterior probability)
post.strict The posterior probability including these components in a risk set
post.only.strict The posterior probability including these components and no other components in a risk set
WT Wildtype or the genotype included in the mcmc run as 1
HE Heterozygote or the genotype included in the mcmc run as 2
HO Homozygote or the genotype included in the mcmc run as 3
HE/HO Heterozygote or Homozygote
misc.post The number of sampled risk sets non in any cluster (misc risk sets) divided by the number of iterations
misc.mean the mean for the misc risk sets
misc.mean05 the 90 % lower CI for the mean of the misc risk sets
misc.mean95 the 90 % upper CI for the mean of the misc risk sets
misc.ind05 the 90 % lower CI for the number of individuals in the misc risk sets
misc.ind95 the 90 % upper CI for the number of individuals in the misc risk sets
non.mean The mean for the individuals not placed in a risk group
non.mean05 the 90 % lower CI for the mean of the non risk sets
non.mean85 the 90 % upper CI for the mean of the non risk sets
non.ind05 the 90 % lower CI for the number of individuals in the non risk sets
non.ind95 the 90 % upper CI for the number of individuals in the non risk sets
mean.sd the mean of the standard deviation

Warning

....

Note

~~further notes~~

~Make other sections like Warning with section{Warning }{....} ~

Author(s)

anders albrechtsen

References

~put references to the literature/web site here ~

See Also

~~objects to See Also as help, ~~~


[Package BAMSE version 2.0 Index]