plot.collindlnmnonlinear {collin}R Documentation

Visualize effects of collinearity in distributed lag model under an hypothetical non-linear effect pattern.

Description

Visualize the results from a distributed lag model under an hypothetical non-linear effect pattern provided by the user, generated using the function collindlnm. The number of plots shown is equal to the number of values passed by at in the function collindlnm. The way in which these plots are displayed is controlled by the user through the argument show.

Usage

## S3 method for class 'collindlnmnonlinear'
plot(
  x,
  lags = NULL,
  show = c("manual", "auto", "sequence"),
  addlegend = TRUE,
  varlegend = NULL,
  ...
)

Arguments

x

an object of class "collindlnmnonlinear", which is generated by the function collindlnm with shape = "nonlinear".

lags

a number or a numeric vector indicating at what lags the results will be visualized. Default (NULL) shows all lags.

show

character indicating how the multiple plots will be shown. If show = "manual", then it is expected that the user have previously set the graphical parameters to arrange them (i.e. setting mfrow) with par. If show = "auto", then the arrangement of the plots (i.e. the value of mfrow) is automatically set. If show = "sequence", then the plots are sequentially overlaid.

addlegend

logical indicating whether a legend indicating at what value (of at passed in collindlnm) the results correspond to.

varlegend

character indicating the label for the explored variable to be shown in the legend.

...

other parameters to be passed through to plot function.

Value

A plot showing a comparison between results under the fitted model and the results under the hypothetical true effect, for each of the different values of the variable of interest where effects were explored.

See Also

collindlnm, plot.collindlnmlinear.


[Package collin version 0.0.4 Index]