It is a plot method for gel
or gmm
objects.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  ## S3 method for class 'gel'
plot(x, which = c(1L:4),
main = list("Residuals vs Fitted values", "Normal QQ",
"Response variable and fitted values","Implied probabilities"),
panel = if(add.smooth) panel.smooth else points,
ask = prod(par("mfcol")) < length(which) && dev.interactive(), ...,
add.smooth = getOption("add.smooth"))
## S3 method for class 'gmm'
plot(x, which = c(1L:3),
main = list("Residuals vs Fitted values", "Normal QQ",
"Response variable and fitted values"),
panel = if(add.smooth) panel.smooth else points,
ask = prod(par("mfcol")) < length(which) && dev.interactive(), ...,
add.smooth = getOption("add.smooth"))

x 

which 
if a subset of the plots is required, specify a subset of
the numbers 
main 
Vector of titles for each plot. 
panel 
panel function. The useful alternative to

ask 
logical; if 
... 
other parameters to be passed through to plotting functions. 
add.smooth 
logical indicating if a smoother should be added to
most plots; see also 
It is a beta version of a plot method for gel
objects. It is a modified version of plot.lm
. For now, it is available only for linear models expressed as a formula. Any suggestions are welcome regarding plots or options to include.
The first two plots are the same as the ones provided by plot.lm
, the third is the dependant variable y with its mean \hat{y} (the fitted values) and the last plots the implied probabilities with the empirical density 1/T.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24  # GEL #
n = 500
phi<c(.2,.7)
thet < 0
sd < .2
x < matrix(arima.sim(n = n,list(order = c(2,0,1), ar = phi, ma = thet, sd = sd)), ncol = 1)
y < x[7:n]
ym1 < x[6:(n1)]
ym2 < x[5:(n2)]
H < cbind(x[4:(n3)], x[3:(n4)], x[2:(n5)], x[1:(n6)])
g < y ~ ym1 + ym2
x < H
t0 < c(0,.5,.5)
res < gel(g, x, t0)
plot(res, which = 3)
plot(res, which = 4)
# GMM #
res < gmm(g, x)
plot(res, which = 3)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.