resid.mix {mixreg} | R Documentation |
Calculates the residuals from each component of the mixture and the matrix of probabilities that each observation was generated by each component.
resid.mix(object, x, y, std=FALSE)
object |
List describing the fitted mixture of regressions as returned by mixreg. |
x |
The matrix of predictors to which the mixture has been fitted. If there is only one predictor then x may be a vector. |
y |
The vector of observed values to which the mixture has been fitted. |
std |
Logical argument; if TRUE then the residuals are standardized (by dividing them by their estimated standard deviation). |
The calculation of the estimated standard deviations of the residuals is a little bit complicated since each component of the model is fitted using weighted regression in a setting in which the weights are NOT the reciprocals of error variances. See the reference below for more detail.
A list (of class "mresid") with components
resid |
The residuals of the model in a matrix. The k-th column of this matrix is the vector of residuals from the k-th component of the model. |
gamma |
The matrix of probabilities that each observation was generated by each component |
x |
The x argument of the call to resid.mix |
y |
The y argument of the call to resid.mix |
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, cband, covmix, mixreg, plot.cband, plot.mresid, qq.mix
#See mixreg for examples.