plot.logbin.smooth: Default logbin.smooth Plotting

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/plot.logbin.smooth.r


The main use is to take a fitted logbin.smooth object produced by logbin.smooth and plot the component smooth functions that make it up, for specified values of the other covariates.

Alternatively, plots the model diagnostics usually provided by plot.lm.


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



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


for "response" and "link", the type of prediction required. Note that, unlike predict.logbin.smooth, "terms" is not a valid option.

for "diagnostics", plot.lm is called.


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, in particular any arguments to plot.lm (e.g. which).


For each smooth covariate in the model of x, predict.logbin.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.logbin.smooth to get predictions for the dataset of your choice, and do the plotting manually.


Mark W. Donoghoe

See Also

logbin.smooth, predict.logbin.smooth


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

mdonoghoe/logbin documentation built on June 26, 2020, 11:10 p.m.