methods_rfhcFit: Plot and Print rfhcFit-objects.

Description Usage Arguments Details See Also Examples

Description

Plot and print the result object of function fitRFHC.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'rfhcFit'
plot(x, burnin=1, thin=1, Rburnin=1, Rthin=1, data=TRUE, sigma=FALSE, ...)
## S3 method for class 'rfhcFit'
summary(x, burnin=1, thin=1, Rburnin=1, Rthin=1, paradj=1, Radj=1, ...)

## S3 method for class 'rfhcFit'
print(x, ...)

plotRtraj.rfhcFit(x, these, burnin=1, thin=1, ...)
plotRpost.rfhcFit(x, burnin=1, thin=1, these=1:6, maxcol=6, breaks=50, error=TRUE, ...)

Arguments

x

Result of fitRFHC.

burnin, thin

The posterior esimates are based on a MCMC sample taken with vector seq(burnin, iter, by=thin).

Rburnin, Rthin

Burn-in and thinning for the predicted R-values, i.e. we sample the prediction chain with seq(Rburnin, Riter, by=Rthin) where ‘Riter’ depends on ‘predict.R’ (see fitRFHC).

data

Should the data be plotted.

sigma

If tau estimated, plot the history as tau or sigma^2=1/tau.

paradj, Radj

Bandwith adjusting parameter given to density when computing posterior densities, see “Details”. ‘paradj’ for hyperparameters, ‘Radj’ for R(x_i)-values.

these

Which of the dataholding R values should be plotted. Indexing matches that of data points i.e. i=1,...,n.

maxcol, breaks

Layout width and resolution of histogram.

error

If true, plot the (di-Ri)/di instead of Ri.

...

Additional parameteres passed on to the function plot.im that plots the field. E.g. colors, ribbon options.

Details

Write R=Robs union Rs, where Robs is the dataholding R's and Rs is predicted outside data.

Print: Print short description. Note especially the length of R chain, this is important for choosing ‘Rburnin’ and ‘Rthin’.

Plot: Plots the data, the MCMC histories of estimated hyperparameters and the posterior mean field + the median of posterior Robs values. If the library ‘mmap’ is installed (from the author), the median marks are compared to true values and a kernel smoothed mean field of the squared difference is plotted.

Plot R trajectories: Plots the history of Robs values.

Plot R posterior: Plots the posterior histogram of Robs values. Either the value or the relative error to nearest neighbour distance. Red line is the beta-link (see fitRFHC).

Summary: Summarises the fit. Value is an object of class rfhcFitSummary, see the class-page for more details.

See Also

fitRFHC, rfhcFitSummary.

Examples

1
2
3
4
5
 x <- simulateRFHC()
 f <- fitRFHC(x)
 s <- summary(f)
 ## Not run: plot(s)
 print(s) 

antiphon/rfhc documentation built on May 10, 2019, 12:20 p.m.