| plot.flexreg | R Documentation |
flexreg ObjectsMethod for plotting regression curves for the mean from fitted regression model objects of class `flexreg`.
## S3 method for class 'flexreg'
plot(
x,
name.x,
additional.cov.default = NA,
smooth = TRUE,
cluster = FALSE,
type = "response",
...
)
x |
an object of class |
name.x |
a character containing the name of the covariate from the mean model to be plotted on the x-axis of the scatterplot. |
additional.cov.default |
a list of additional covariates from the mean model and their value to be set as default. |
smooth |
a logical value indicating wheater the curves should be smooth ( |
cluster |
logical. If the model is |
type |
a vector of characters indicating the regression curves to be plotted. Available options are |
... |
additional arguments. Currently not used. |
The function produces a scatterplot of the covariate from the mean model specified in name.x and y or y/n if the response is bounded continuous or discrete, respectively. Any other variable specified in the mean model must be set to a default through the additional.cov.default argument.
The argument type = "response" plots the conditional mean curve (i.e., \mu), whereas the argument type = "response.aug", available only for augmented models,
plots the augmented mean curve.
If the regression model is of "FB" or "FBB" type and cluster = TRUE, then the function returns two additional curves corresponding to the component means, i.e., \lambda_1 and \lambda_2.
## Not run:
data("Reading")
FB <- flexreg(accuracy.adj ~ iq + dyslexia, data = Reading)
plot(FB, name.x="iq", additional.cov.default = list("dyslexia"=1))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.