plot.photofit: Plot results of a model fit

Description Usage Arguments Details Examples

View source: R/ModelAnalysis.R

Description

Plot results of a model fit

Usage

1
2
## S3 method for class 'photofit'
plot(fit, type = "response", prob = 0.95, include_error = FALSE, ...)

Arguments

fit

Object that results fof class photofit

type

String indicated the type of figure to plot. See "details".

prob

Probability use to calculate prediction intervals for the plot of type "response".

...

Other arguments to the function "predict" for plots of type "response"

Details

Three types of plots are supported, depending on the string assigned to the argument type:

1. type = "response": This will plot the measured response curve (as points), the median prediction and the quantile intervals for the mean and for future observations (i.e. taking into account measurement error) for the given probability (argument prob).

2. type = "marginal"" This will be display density plots for every marginal distribution in the posterior.

3. type = "pairs": This will display contour plot of probability density for each pair of parameters, the marginal distributions (as in the previous type) and the correlation between every pair of parameters (using Pearson's correlation coefficient).

Examples

1
2
3
4
5
6
7
data = data.frame(PAR = c(25, 50, 100, 150, 250, 350, 501, 503, 750, 1000),
                  A = c(0.51, 2.04, 4.41, 6.08, 8.03, 9.36, 9.85, 10.51, 11.14, 11.76))
fit = fitNRH(data)
summary(fit)
plot(fit)
plot(fit, type = "marginal")
plot(fit, type = "pairs")

AleMorales/photofit documentation built on March 19, 2020, 12:01 a.m.