plotSampledPrev: Plotting expected

Description Usage Arguments Details Value See Also Examples

View source: R/plotSampledPrev.R

Description

Two functions for plotting the expected distribution of affecteds in a family, either assuming no genetic risk factors, or using sampled from a custom distribution of affecteds (such as produced by MangroveTree).

Usage

1
2
plotNaivePrev(ped,K,maxN = NULL,...)
plotSampledPrev(samples, obs_prev, exp_prev, maxN = NULL, ...)

Arguments

ped

A MangrovePed object.

K

The prevalence of the disease.

samples

Samples from the distribution of number of affecteds.

obs_prev

The number of affecteds actually observed.

exp_prev

The expected number of affecteds under a naive model.

maxN

The maximum number of affecteds to be shown on the graph. If NULL, an appropriate maximum is selected from the data.

...

Additional arguments to plot.

Details

These functions are used to assess how "unusual" a family is in terms of the number of affected individuals it contains. plotNaivePrev plots the distribution of affected individuals in the family assuming no genetic risk factors (i.e. under a binomial model). plotSampledPrev is more general, and takes in a set of samples from the expected distribution.

Note that plotSampledPrev is called by plot.MangroveSample to plot the results of a MangroveTree sampling. It will be easier to use the print.MangroveSample method rather than using plotSampledPrev under most circumstances.

Value

Neither function returns anything.

See Also

MangroveSample

Examples

1
2
3
4
data(famped)

plotNaivePrev(famped,0.02) # is this unexpected for a 2% disease?
plotNaivePrev(famped,0.04) # how about for a 4% disease?

Mangrove documentation built on May 1, 2019, 9:10 p.m.