MangroveContPreds {Mangrove} | R Documentation |
The MangroveContPreds class
Description
Methods to generate, summarise and apply MangroveContPreds objects
Usage
calcBetas(ped,betas)
applyBetas(contpred,mu,sigma)
## S3 method for class 'MangroveContPreds'
print(x, ...)
## S3 method for class 'MangroveContPreds'
summary(object, ...)
## S3 method for class 'MangroveContPreds'
plot(x, ...)
Arguments
ped |
A |
betas |
A |
contpred |
A |
object |
A |
x |
A |
mu |
The population mean of the quantitative trait being predicted |
sigma |
The population standard deviation of the quantitative trait being predicted |
... |
Arguments to be passed on to downstream methods. |
Details
MangroveContPreds
objects are used to hold quantitative (or continuous) trait predictions for a number of individuals. This object contains the beta value for the trait (i.e. the person's value of the trait on a scale with the population mean being zero and the population standard deviation being one). You can generate per-individual beta values from a pedigree object and some per-variant beta values using calcBetas
, and you can transform these to quantitative trait predictions given a population mean and standard deviation using applyBetas
.
The print
method writes the beta value for each individual to screen. The summary
method gives some quantile information, and the plot
method plots a histogram of predicted values, which should be approximately normal.
Value
calcBetas
returns a MangroveContPreds
object, applyBetas
returns a numeric vector containing posterior probabilities. The methods do not return anything.
See Also
MangroveRiskPreds
for doing risk prediction for binary traits.
Examples
data(contped)
data(exampleBetas)
predbetas <- calcBetas(contped,exampleBetas)
summary(predbetas)
plot(predbetas)
contpreds <- applyBetas(predbetas,162,6.4)