Description Usage Arguments Details Value Examples
plot.carx
plots a fitted carx
object.
1 2 3 |
x |
a fitted |
FUN |
an optional function to be applied to the transform the responses before plotting.
This is useful for plotting the data on the original scale if the fitted |
xAxisVar |
an optional vector to be plotted as the x variable. Default =
|
xlab |
the label of the x axis. Default = "Index". |
ylab |
the label of the y axis. Default = "Response". |
... |
other parameters supplied to the generic function |
The y axis will be the values related to the response.
If the fitted object contains the data and censored information in a cenTS
object,
the function will take advantage of the plot function for a cenTS
object and superimpose the plot of the fitted values.
Otherwise, the plot function will try to produce a plot similar to the previous case, while the x axis can be supplied by the user through xAxisVar
, which must be ordinal and increasing.
None. A plot will be displayed.
1 2 3 4 5 6 7 8 9 10 11 12 | #case 1: plot with cenTS object in the object, note that the x-axis is in date.
dat = carxSimCenTS(nObs=100,seed=0)
mdl <- carx(y~X1+X2-1,data=dat, p=2, CI.compute = FALSE)
#use default settings
plot(mdl)
#case 2: plot without cenTS object in the object, note that the x-axis is a vector of numbers.
dat = carxSim(nObs=100,seed=0)
mdl <- carx(y=dat$y, x=dat[,c("X1","X2")], ci=dat$ci, lcl=dat$lcl, ucl=dat$ucl, p=2)
#or simply call
mdl <- carx(y~X1+X2-1,data=dat, p=2, CI.compute = FALSE)
plot(mdl)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.