Learn R Programming

nlr (version 0.1-3)

mplot: Multiple Plot

Description

plot multiple models stored in nl.fitt and its child objects, in same graph.

Usage

mplot(mlist, case = 1, length.out = NULL, ...)

Arguments

mlist

list of object models

case

case=1, common x, case=2, different x

length.out

length of predictor to be increamented, if not given the original predictor data will be used.

extra option submit to plot.

Value

Plot graph.

Details

If different methods are used to estimate a model this function can be used to plot them all in same graph. Multiple output of estimates in nlr package should be stored in a list, then mplot plot data and predicted values for all methods over the data.

References

Rizo ML 2008 Statistical Computing with R The R Series. Chapman & Hall/CRC The R Series.

See Also

nl.fitt

Examples

Run this code
# NOT RUN {
datalist<-list(xr=trade.ir[,1],yr=trade.ir[,2])
a1<- nlr(nlrobj5[[18]],data=datalist,
control=nlr.control(trace=TRUE,derivfree = FALSE,tolerance=1e-4,singularCase=1,maxiter = 8000))    
a2<- nlr(nlrobj5[[18]],data=datalist,
control=nlr.control(trace=TRUE,method="OLS",
derivfree = FALSE,tolerance=1e-4,maxiter = 4000))    # nelder mead, MM, selfstart

mlist=list(a1,a2)
mplot(mlist)
# }

Run the code above in your browser using DataLab