Learn R Programming

vows (version 0.5)

plot.semipar.mp: Plot massively parallel semiparametric models

Description

Given a massively parallel smoothing object produced by semipar.mp, the function plots the fitted smooth(s) for a given point (e.g., at a given voxel).

Usage

"plot"(x, Y, arr.ind = NULL, which.vox = NULL, which.smooth = NULL, coverage = 0.95, length.new = 100, ylim = NULL, ylab = NULL, ...)

Arguments

x
an object of class "semipar.mp".
Y
an $n \times V$ outcome matrix.
arr.ind
a 3-element vector specifying the element of the 3-dimensional array of locations (e.g., voxels) for which plotting is desired. If NULL, which.vox must be specified.
which.vox
the index of the voxel to be plotted. If NULL, arr.ind must be specified.
which.smooth
the index of the smooth term of which the confidence interval plot is to be displayed. The default value is NULL which refers to displaying the plots for all the smooth terms in the model.
coverage
the confidence level of the pointwise confidence intervals in the plot.
length.new
length of the vector of ordered variables with which to predict.
ylim, ylab,
arguments to be passed to plot.
...
arguments to be passed to plot.

Examples

Run this code

n<-32
Ys <- matrix(0, n, 5)
for(i in 1:n) Ys[i,]<--2:2+rnorm(5, i^2, i^0.5)+sin(i)
x1 <- rnorm(n,0,5)
x2 <- 1:n+runif(n, 1, 20)
semipar.obj <- semipar.mp(~x1+sf(x2,k=10),Y=Ys,lsp=seq(5,50,,30))
plot(semipar.obj, Y=Ys, which.vox=2)

Run the code above in your browser using DataLab