Learn R Programming

morse (version 3.3.4)

ppc: Posterior predictive check plot

Description

Plots posterior predictive check for reproFitTT, survFitTT, survFitTKTD, survFitCstExp and survFitVarExp objects.

This is the generic ppc S3 method for the reproFitTT class. It plots the predicted values with 95% credible intervals versus the observed values.

This is the generic ppc S3 method for the survFitCstExp class. It plots the predicted values along with 95% credible intervals versus the observed values for survFit objects.

This is the generic ppc S3 method for the survFitPredict_Nsurv class. It plots the predicted values along with 95% credible intervals versus the observed values for survFitPredict_Nsurv objects.

This is the generic ppc S3 method for the survFitTKTD class. It plots the predicted values along with 95% credible intervals versus the observed values for survFitTKTD objects.

This is the generic ppc S3 method for the survFitTT class. It plots the predicted values with 95 % credible intervals versus the observed values for survFitTT objects.

This is the generic ppc S3 method for the survFitVarExp class. It plots the predicted values along with 95% credible intervals versus the observed values for survFit objects.

Usage

ppc(x, ...)

# S3 method for reproFitTT ppc( x, style = "ggplot", xlab = "Observed Cumul. Nbr. of offspring", ylab = "Predicted Cumul. Nbr. of offspring", main = NULL, ... )

# S3 method for survFitCstExp ppc(x, style = "ggplot", main = NULL, ...)

# S3 method for survFitPredict_Nsurv ppc( x, xlab = "Observed nb of survivors", ylab = "Predicted nb of survivors", main = NULL, ... )

# S3 method for survFitTKTD ppc(x, style = "ggplot", main = NULL, ...)

# S3 method for survFitTT ppc(x, style = "ggplot", main = NULL, ...)

# S3 method for survFitVarExp ppc( x, xlab = "Observed nb of survivors", ylab = "Predicted nb of survivors", main = NULL, ... )

Value

a plot of class ggplot

a plot of class ggplot

a plot of class ggplot

a plot of class ggplot

a plot of class ggplot

a plot of class ggplot

a plot of class ggplot

Arguments

x

An object of class survFitVarExp

...

Further arguments to be passed to generic methods

style

graphical backend, can be 'generic' or 'ggplot'

xlab

A label for the \(X\)-axis, by default Observed nb of survivors.

ylab

A label for the \(Y\)-axis, by default Predicted nb of survivors.

main

A main title for the plot.

Details

Depending on the class of the object x see their links. for class reproFitTT: ppc.reproFitTT ; for class survFitTT: ppc.survFitTT ; for class survFitTKTD: ppc.survFitTKTD ; for class survFitCstExp: ppc.survFitCstExp and for class survFitVarExp: ppc.survFitVarExp.

The coordinates of black points are the observed values of the cumulated number of reproduction outputs for a given concentration (\(X\)-scale) and the corresponding predicted values (\(Y\)-scale). 95% prediction intervals are added to each predicted value, colored in green if this interval contains the observed value and in red in the other case. As replicates are not pooled in this plot, overlapped points are shifted on the \(X-\)axis to help the visualization of replicates. The bisecting line (y = x) is added to the plot in order to see if each prediction interval contains each observed value. As replicates are shifted on the \(X\)-axis, this line may be represented by steps.

The black points show the observed number of survivors (pooled replicates, on \(X\)-axis) against the corresponding predicted number (\(Y\)-axis). Predictions come along with 95% prediction intervals, which are depicted in green when they contain the observed value and in red otherwise. Samples with equal observed value are shifted on the \(X\)-axis. For that reason, the bisecting line (y = x), is represented by steps when observed values are low. That way we ensure green intervals do intersect the bisecting line.

For survFitPredict_Nsurv object, PPC is based on times series simulated for each replicate. In addition, the black points show the observed number of survivors (on \(X\)-axis) against the corresponding predicted number (\(Y\)-axis). Predictions come along with 95% prediction intervals, which are depicted in green when they contain the observed value and in red otherwise.

The black points show the observed number of survivors (pooled replicates, on \(X\)-axis) against the corresponding predicted number (\(Y\)-axis). Predictions come along with 95% prediction intervals, which are depicted in green when they contain the observed value and in red otherwise. Samples with equal observed value are shifted on the \(X\)-axis. For that reason, the bisecting line (y = x), is represented by steps when observed values are low. That way we ensure green intervals do intersect the bisecting line.

The coordinates of black points are the observed values of the number of survivors (pooled replicates) for a given concentration (\(X\)-axis) and the corresponding predicted values (\(Y\)-axis). 95% prediction intervals are added to each predicted value, colored in green if this interval contains the observed value and in red otherwise. The bisecting line (y = x) is added to the plot in order to see if each prediction interval contains each observed value. As replicates are shifted on the x-axis, this line is represented by steps.

The black points show the observed number of survivors (on \(X\)-axis) against the corresponding predicted number (\(Y\)-axis). Predictions come along with 95% prediction intervals, which are depicted in green when they contain the observed value and in red otherwise.