cband {mixreg} | R Documentation |
Produces confidence and prediction bands, two-sided or upper or lower, for the lines fitted in a model consisting of a mixture of one-variable regressions.
cband(object, cov.mat, x, y, alpha=0.05, xlen=100, plotit=FALSE, type=NULL)
object |
Object describing the fitted mixture of regressions, as returned by mixreg. |
cov.mat |
The estimated covariance matrix of the parameter estimates of the fit, as returned by covmix. |
x |
The vector of predictors for each of the regression models in the mixture. Only one-dimensional predictors are permitted here. |
y |
The vector of responses for the regression models. |
alpha |
One minus the confidence level for the confidence and prediction bands; e.g. alpha = 0.05 for 95% confidence. |
xlen |
The number of points to be plotted in the band envelopes. The x-values of the points will be equi-spaced from min(x) to max(x). |
plotit |
Logical argument indicating whether to plot the fitted model and confidence bands. |
type |
Character argument specifying the type of band. Must have one of the values "both", "upper", or "lower". Defaults to "both". |
The prediction bands are conditional in that the associated probability is condtional upon the associated observation being generated by the relevant component of the mixture.
A list (of class "cband") with components
theta |
The parameter list from object (as returned by mixreg). |
intercept |
The logical value from object indicating whether intercepts were fitted. |
x |
The argument x of the call to cband. |
y |
The argument y of the call to cband. |
xf |
The equispaced sequence of values from min(x) to max(x) at which the values of the band envelopes were calculated. |
bnds |
A list with one entry for each component of the mixture. Each entry is a matrix with 4 columns (lower and upper confidence, lower and upper prediction bounds) if type is "both", or with 2 columns (confidence bounds, prediction bounds) if type is "upper" or "lower". |
If plotit is TRUE a plot of the fit and the confidence and prediction bands is produced in whatever device is currently open.
Turner, T. R. (2000) Estimating the rate of spread of a viral infection of potato plants via mixtures of regressions. Appl. Statist. vol. 49, Part 3, pp. 371 – 384.
bootcomp, covmix, mixreg, plot.cband, plot.mresid, qq.mix, resid.mix
#See mixreg for examples.