pred_int_mcg_ntrial: Prediction interval for a data.frame using package 'MCMCglmm'...

Description Usage Arguments Details Value Examples

View source: R/pred_int_mcg.R

Description

Prediction interval for a data.frame using package 'MCMCglmm' and method 'ntrial'

Usage

1
pred_int_mcg_ntrial(formula, data, level = 0.95, control = list(), ...)

Arguments

formula

an object of class formula with response ~ group

data

a data frame which contains the response and the grouping

level

coverage level with default 0.95

control

list which provides crontrol over the MCMC method
burnin = 5000 (default)
nitt = 50000 (default)
prior = list (see MCMCglmm)

Details

Calculate prediction intervals using the 'MCMCglmm' pacakge and method 'ntrial'

see function 'MCMCglmm' in package 'MCMCglmm'. The method adds an extra row to the data.frame with missing response and then calculates the 'prediciton' for that new row using the quantiles from the posterior distribution.

Value

a prediction interval for a "new_trial"

Examples

1
2
3
4
5
6
7
## Not run: 
## Using soybean row spacing
data(soyrs)
pdi <- pred_int_mcg_ntrial(lrr ~ Trial_ID, data = soyrs)
pdi 

## End(Not run)

femiguez/predintma documentation built on July 5, 2021, 4:16 a.m.