Learn R Programming

nsgp (version 1.0.5)

plot.gppack: Plots several GP's simultaneously

Description

Plots the GP's corresponding to the control and case data, as well as the null model. Visualizes the log likelihood ratios between the null and individual models. Several boolean parameters for modifying the plot. By default plots the data, posterior mean and 95% interval for CASE and CONTROL.

Usage

"plot"(x, y = NULL, plotdata = TRUE, plotmeans = TRUE, plotcovs = TRUE, plotnoises = FALSE, plotnull = FALSE, plotratios = "emll", thr = 1, samples = 0, sigma = 2, title = NULL, legend = FALSE, plotgradient = TRUE, ...)

Arguments

x
the gppack-object
y
placeholder variable
plotdata
plot the data (default)
plotmeans
plot the GP mean (default)
plotcovs
plot the GP covariances (default)
plotnoises
plot the observational noise (default)
plotnull
plots also the null model
plotratios
plots the ratios, choices are emll, mll, npc, pc
thr
ratio threshold
samples
plot N samples from the GP
sigma
variance level to plot
title
plot title
legend
plot legend
plotgradient
use gradient graphics
...
...

Details

The threshold thr is the logarithmic likelihood ratio between null and control+case models. The default value 1 hence corresponds to a likelihood ratio of 2.72.

Examples

Run this code
# read toy data
data(toydata)

## Not run: can take several minutes
# # perform two-sample regression
# res = gpr2sample(toydata$ctrl$x, toydata$ctrl$y, toydata$case$x, toydata$case$y, seq(0,22,0.1))
# 
# # pre-computed model for toydata
# data(toygps)
# res = toygps
# 
# # basic plot
# plot(res)
# 
# # plot also the null model, don't plot data, means or noise
# plot(res, plotnull=TRUE, plotdata=FALSE, plotmeans=FALSE, plotnoise=FALSE)## End(Not run)

Run the code above in your browser using DataLab