Learn R Programming

fsemipar (version 1.1.1)

plot.classes: Graphical representation of regression model outputs

Description

plot functions to generate visual representations for the outputs of several fitting functions: FASSMR.kernel.fit, FASSMR.kNN.fit, fsim.kernel.fit, fsim.kernel.fit.optim, fsim.kNN.fit, fsim.kNN.fit.optim, IASSMR.kernel.fit, IASSMR.kNN.fit, lm.pels.fit, PVS.fit, PVS.kernel.fit, PVS.kNN.fit, sfpl.kernel.fit, sfpl.kNN.fit,sfplsim.kernel.fit and sfplsim.kNN.fit.

Usage

# S3 method for FASSMR.kernel
plot(x,ind=1:10, size=15,col1=1,col2=2,col3=4,option=0,...)

# S3 method for FASSMR.kNN plot(x,ind=1:10, size=15,col1=1,col2=2,col3=4,option=0, ...)

# S3 method for fsim.kernel plot(x,size=15,col1=1,col2=2, ...)

# S3 method for fsim.kNN plot(x,size=15,col1=1,col2=2,...)

# S3 method for IASSMR.kernel plot(x,ind=1:10, size=15,col1=1,col2=2,col3=4,option=0, ...)

# S3 method for IASSMR.kNN plot(x,ind=1:10, size=15,col1=1,col2=2,col3=4,option=0, ...)

# S3 method for lm.pels plot(x,size=15,col1=1,col2=2,col3=4, ...)

# S3 method for PVS plot(x,ind=1:10, size=15,col1=1,col2=2,col3=4,option=0, ...)

# S3 method for PVS.kernel plot(x,ind=1:10, size=15,col1=1,col2=2,col3=4,option=0, ...)

# S3 method for PVS.kNN plot(x,ind=1:10, size=15,col1=1,col2=2,col3=4,option=0, ...)

# S3 method for sfpl.kernel plot(x,size=15,col1=1,col2=2,col3=4, ...)

# S3 method for sfpl.kNN plot(x,size=15,col1=1,col2=2,col3=4, ...)

# S3 method for sfplsim.kernel plot(x,size=15,col1=1,col2=2,col3=4, ...)

# S3 method for sfplsim.kNN plot(x,size=15,col1=1,col2=2,col3=4, ...)

Value

The functions return different graphical representations.

  • For the classes fsim.kNN and fsim.kernel:

    1. The estimated functional index: \(\hat{\theta}\).

    2. The regression fit.

  • For the classes lm.pels, sfpl.kernel and sfpl.kNN:

    1. The response over the fitted.values.

    2. The residuals over the fitted.values.

  • For the classes sfplsim.kernel and sfplsim.kNN:

    1. The estimated functional index: \(\hat{\theta}\).

    2. The response over the fitted.values.

    3. The residuals over the fitted.values.

  • For the classes FASSMR.kernel, FASSMR.kNN, IASSMR.kernel, IASSMR.kNN, sfplsim.kernel and sfplsim.kNN:

    1. If option=1: The curves with the estimated impact points (in dashed vertical lines).

    2. If option=2: The estimated functional index: \(\hat{\theta}\).

    3. If option=3:

      • The response over the fitted.values.

      • The residuals over the fitted.values.

    4. If option=0: All chart are plotted.

  • For the classes PVS, PVS.kNN, PVS.kernel:

    1. If option=1: The curves with the estimated impact points (in dashed vertical lines).

    2. If option=2:

      • The response over the fitted.values.

      • The residuals over the fitted.values.

    3. If option=0: All chart are plotted.

All the routines implementing the plot S3 method use internally the R package ggplot2 to produce elegant and high quality charts.

Arguments

x

Output of the functions mentioned in the Description (i.e. an object of the class FASSMR.kernel, FASSMR.kNN, fsim.kernel,fsim.kNN, IASSMR.kernel, IASSMR.kNN, lm.pels, PVS, PVS.kernel, PVS.kNN, sfpl.kernel,sfpl.kNN, sfplsim.kernel or sfplsim.kNN).

ind

Indexes of the colors for the curves in the chart of estimated impact points. The default is 1:10

size

The size for title and axis labels in pts. The default is 15.

col1

Color of the points in the charts. Also, color of the estimated functional index representation. The default is black.

col2

Color of the nonparametric fit representation in FSIM functions, and of the straight line in 'Response vs Fitted Values' charts. The default is red.

col3

Color of the nonparametric fit of the residuals in 'Residuals vs Fitted Values' charts. The default is blue.

option

Selection of charts to be plotted. The default, option = 0, means all charts are plotted. See the section Details.

...

Further arguments passed to or from other methods.

Author

German Aneiros Perez german.aneiros@udc.es

Silvia Novo Diaz snovo@est-econ.uc3m.es

See Also

FASSMR.kernel.fit, FASSMR.kNN.fit, fsim.kernel.fit, fsim.kNN.fit, IASSMR.kernel.fit, IASSMR.kNN.fit, lm.pels.fit, PVS.fit, PVS.kernel.fit, PVS.kNN.fit, sfpl.kernel.fit, sfpl.kNN.fit, sfplsim.kernel.fit and sfplsim.kNN.fit.