predictive: Predictive distributions

Description Usage Arguments See Also Examples

View source: R/Medbetareg.r

Description

Plot of a predictive distribution chosen by the user.

Usage

1
predictive(x, cnfg, nrep = 500, title = NULL)

Arguments

x

An object of class mbr.

cnfg

A numerical vector representing a configuration of explanatory variables (original scale).

nrep

An integer positive number representing the number of Monte Carlo replications. Default is 500.

title

The title of the plot. If NULL (the default), the configuration of explanatory variables is shown as a title.

See Also

newPrior

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
assess.test <- 'RESP RespRate (0,15,25,40);
  CEV intraShunt (0,2,5,100) 0.5 hp 0.5 hp 5;
  CEV deadSpace (0,0,30,100) 0.5 hp 0.5 hp 5;
  CEV extraShunt (0,0,5,100) 0.5 hp 0.5 hp 5;
  CEV redAlvSpace (0,0,5,100) 0.5 hp 0.5 hp 5;
  BEV Panic 0.25 hp 25;
  BEV Neuromusc 0.6 lp 100;
  INTER intraShunt deadSpace 0.9 hp 5;
  TAU 0.3 n'
###  NOT RUN: replicate the results in Magrini et al. (2018)
# set.seed(10)
# prior.test <- newPrior(assess.test, nrep=5000)
# set.seed(10)
# predictive(prior.test, xcfg1, nrep=50000, title="Configuration 1")
# set.seed(10)
# predictive(prior.test, xcfg2, nrep=50000, title="Configuration 2")
# set.seed(10)
# predictive(prior.test, xcfg3, nrep=50000, title="Configuration 3")
# set.seed(10)
# predictive(prior.test, xcfg4, nrep=50000, title="Configuration 4")
#############
prior.test <- newPrior(assess.test, nrep=100)
predictive(prior.test, c(5,30,5,5,0,0), nrep=500)

alessandromagrini/Medbetareg documentation built on March 7, 2021, 4:54 p.m.