plot.addreg.smooth {addreg}R Documentation

Default addreg.smooth Plotting


Takes a fitted addreg.smooth object produced by addreg.smooth and plots the component smooth functions that make it up, on the scale of the linear predictor, for specified values of the other covariates.


## S3 method for class 'addreg.smooth'
plot(x, type = c("response", "link"), at = data.frame(), 
     knotlines = TRUE, nobs = 1000, ...)



a fitted addreg.smooth object as produced by addreg.smooth.


the type of prediction required. Note that, unlike predict.addreg.smooth, "terms" is not a valid option. Also, because addreg.smooth only applies identity-link models, "response" and "link" will have the same results — they are included for consistency.


a data frame containing the values at which the prediction should be evaluated. The columns must contain the covariates in the model, and several rows may be provided (in which case, multiple lines are drawn on the same plot). Cannot be missing or NULL.


logical; if vertical lines should be drawn on the plot to indicate the locations of the knots for B-spline terms.


the number of points which should be used to create the curve. These are placed evenly along the range of the observed covariate values from the original model.


other graphics parameters to pass on to plotting commands (note: some will not work).


For each smooth covariate in the model of x, predict.addreg.smooth is used to obtain predicted values for the range of that covariate, with the other covariates remaining fixed at their values given in at. Several rows may be provided in at, in which case, one curve is drawn for each, and they are coloured using rainbow(nrow(at)). If the model contains a single smooth covariate and no other covariates, at may be provided as an empty data frame, data.frame().


The function simply generates plots.


If this function is too restrictive, it may be easier to use predict.addreg.smooth to get predictions for the dataset of your choice, and do the plotting manually.


Mark W. Donoghoe

See Also

addreg.smooth, predict.addreg.smooth


## For an example, see example(addreg.smooth)

[Package addreg version 3.0 Index]