plot.ldt.estim {ldt}R Documentation

Plot Diagnostics for ldt.estim Object

Description

This function creates diagnostic plots for estimated regression models of ldt.estim class.

Usage

## S3 method for class 'ldt.estim'
plot(
  x,
  equation = 1,
  type = c(1, 2, 3, 4, 5, 6),
  ablineArgs = list(col = "lightblue"),
  textArgs = list(pos = 3, cex = 0.7, col = "red"),
  ...
)

Arguments

x

An object of type ldt.estim.

equation

A number or a name of endogenous variable specifying an equation in the estimated system.

type

One of these numbers: 1, 2, 3, or 5. See which argument in plot.lm documentation.

ablineArgs

A list of additional arguments to customize the "text" function used for labeling influential observations.

textArgs

A list of additional arguments to customize the "abline" function.

...

additional arguments to be passed to "plot" (or "qqnorm" function for type=2, or "barplot" for type=4).

Details

This function is designed to be similar to plot.lm function. However, note that an ldt.estim object might be a system estimation.

Some plots use standardized residuals. Note that they are not calculated in a system estimation context. See residuals.ldt.estim documentation for a description. Cook's distance is also calculated equation-wise. Its formula is:

d=ri2kvar(r)hii(1hii)2 d = \frac{r_i^2}{k*var(r)}\frac{h_{ii}}{(1-h_{ii})^2}

where rir_i and hiih_{ii} are residual and leverage in ii-th observation, respectively. var(r)var(r) is variance of residuals and kk is the number of estimated coefficients in the equation. Note that Cook's distance is not implemented for weighted observations.

Value

This function creates diagnostic plots for regression models. It also returns a list with x and y data used in plot functions.


[Package ldt version 0.5.3 Index]