Description Usage Arguments Value Author(s) See Also Examples

Computes and returns estimated dosages under specified model using posterior probabilities derived from mcmc chains by the proportion of samples in each dosage class.

1 2 3 |

`mcmc.mixture` |
Object of type |

`jags.control` |
Object of class |

`seg.ratio` |
Object of class |

`chain` |
Which chain to use when compute dosages (Default: 1) |

`max.post.prob` |
Logical for producing dose allocations based on the
maximum posterior probability (Default: |

`thresholds` |
Numeric vector of thresholds for allocating dosages when the posterior probabilty to a particular dosage class is above the threshold |

`print` |
Logical indicating whether or not to print intermediate
results (Default: |

`print.warning` |
Logical to print warnings if there is more than one marker with the maximum posterior probability |

`index.sample` |
Numeric vector indicating which markers to print
if |

An object of class `dosagesMCMC`

is returned with components:

`p.dosage ` |
Matrix of posterior probabilities of dosages for each marker dosage |

`dosage` |
Matrix of allocated dosages based on posterior probabilities.
The columns correspond to different 'thresholds' and if requested,
the last column is allocated on basis of |

`thresholds` |
vector of cutoff probabilities for dosage class |

`chain` |
Chain used to compute dosages |

`max.post` |
maximum dosage posterior probabilties for each marker |

`index.sample` |
Numeric vector indicating which markers to print
if |

Peter Baker [email protected]

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ```
## simulate small autooctaploid data set
a1 <- sim.autoMarkers(8,c(0.7,0.2,0.1),n.markers=100,n.individuals=50)
## compute segregation ratios
sr <- segregationRatios(a1$markers)
## set up model, priors, inits etc and write files for JAGS
x <- setModel(3,8)
x2 <- setPriors(x)
dumpData(sr, x)
inits <- setInits(x,x2)
dumpInits(inits)
writeJagsFile(x, x2, stem="test")
## Not run:
## run JAGS
small <- setControl(x, burn.in=200, sample=500)
writeControlFile(small)
rj <- runJags(small) ## just run it
print(rj)
## read mcmc chains and produce dosage allocations
xj <- readJags(rj)
dd <- dosagesJagsMix(xj, small, sr)
print(dd)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.