Nonparametric regression (kernel regression) with XLSTAT

Conjunto de datos para Regresión no paramétrica (Kernel y LOWESS) XLS119 KB

Vídeo de tutorial
Regresión no paramétrica (Kernel y LOWESS) es parte de : Descargar evaluación Más detalles Ver los comentarios del usuario

Ventajas

  • Sencillo y dirigido a los usuarios
    Sencillo y dirigido a los usuarios XLSTAT es un software que se integra de forma transparente con Microsoft Excel, que es la hoja de cálculo más difundida del mundo. Esta integración hace que sea una de las herramientas más sencillas para trabajar ya que utiliza la misma filosofía que Microsoft Excel. El programa está disponible en una ficha de XLSTAT. Los análisis se agrupan en menús funcionales. Los cuadros de diálogo están dirigidos a los usuarios, por lo que la preparación de los análisis es tarea sencilla.
  • Resultados y datos compartidos sin dificultad
    Resultados y datos compartidos sin dificultad Una de las mayores ventajas de XLSTAT es la forma transparente con la que se pueden compartir los datos y los resultados. Los resultados se almacenan en Microsoft Excel de modo que cualquier usuario puede acceder a ellos. No es necesario que el destinatario tenga una licencia de XLSTAT o cualquier visor adicional, lo que facilita y rentabiliza el trabajo en equipo. Del mismo modo, es fácil integrar los resultados en otras aplicaciones de Microsoft Office, como PowerPoint, por lo que se pueden crear estupendas presentaciones en cuestión de minutos.
  • Modular
    Modular XLSTAT es un producto modular. XLSTAT-Pro es un módulo principal de estadística de XLSTAT, que incluye todas las funcionalidades dominantes en el análisis estadístico y multivariado. Es posible añadir funciones más avanzadas por medio de módulos complementarios para aplicaciones específicas. De este modo es posible adaptar el software a sus necesidades, aumentando la rentabilidad.
  • Didáctico
    Didáctico Los resultados de XLSTAT están organizados por análisis y es fácil desplazarse por ellos. La información útil se proporciona junto con los resultados para ayudarle en su interpretación.
  • Asequible
    Asequible XLSTAT es una solución completa y modular que se puede ajustar a cualquier necesidad de análisis comercial. Tiene un precio muy razonable, por lo que el retorno de su inversión es casi inmediato. Todas las licencias de XLSTAT incluyen también un servicio de asistencia de la mayor calidad.
  • Accesible: disponible en muchos idiomas
    Accesible: disponible en muchos idiomas Nos hemos asegurado de que XLSTAT sea accesible para todos traduciendo el programa a muchos idiomas, incluyendo chino, inglés, alemán, italiano, japonés, polaco, portugués y español.
  • Automatizable y personalizable
    Automatizable y personalizable La mayoría de las funciones estadísticas disponibles en XLSTAT pueden llamarse directamente desde la ventana Visual Basic de Microsoft Excel. Pueden modificarse e integrarse en código fuente adicional para ajustarse a sus necesidades. Añadir tablas y trazados, así como modificar los resultados existentes se convierte en tarea sencilla. Además, XLSTAT incluye algunas herramientas especiales en los cuadros de diálogo para generar automáticamente el código fuente VBA para reproducir su análisis empleando el editor de VBA o simplemente cargar ajustes predeterminados. Esta automatización de análisis rutinarios sin esfuerzo le ahorrará gran cantidad de tiempo.

Kernel regression belongs to the family of nonparametric regression methods. It is also sometimes related to the smoothing methods. Kernel regression typically requires three phases:

  • a fitting step during which one tries to find the best combine of model type, kernel function, and bandwidth, using a test sample.
  • a validation phase that allows to validate the model on new observations for which the prediction is known;
  • an application phase, where the model is applied to a new set of data for which the prediction is unknown.

Note: nonparametric regression includes a validation phase as a given observation is never used to build the model that is used to generate the corresponding prediction. However, one can still isolate a sub-sample that is only dedicated to the validation phase, to check the model robustness.

On the opposite to the classical linear regression, the goal is not to find a unique model that describes/explains/predict a phenomenon, but to obtain an efficient predictive method. Nonparametric regression is a kind of a black box. It is numerically intensive, as for each observation a new model is computed (in Robust Lowess regression, up to three models are computed for each observation).

Data for the kernel regression

The example that is treated in this tutorial corresponds to a very simple case, and the interest is only illustrative. Nonparametric regression can be very useful to predict complex phenomena such as time series in finance, air pollution from one day to the next, or sales from quarter to the next. It is also sometimes used to smooth a series of data.

The example uses the same data as those used for the tutorial on linear regression.

An Excel sheet containing both the data and the results for use in this tutorial can be downloaded by clicking here.

The data have been obtained in [Lewis T. and Taylor L.R. (1967). Introduction to Experimental Ecology, New York: Academic Press, Inc.]. They concern 237 children, described by their Gender, Age in months, Height in inches (1 inch = 2.54 cm), and Weight in pounds (1 pound = 0.45 kg).

The study is divided into two phases: a fitting phase where 217 individuals are used, and a validation phase with 20 individuals (10 women et 10 men).

Setting up a kernel regression

After opening XLSTAT, select the XLSTAT / Modeling data / Nonparametric regression command, or click on the corresponding button of the Modeling Data toolbar (see below).

barkern.gif

Once you've clicked on the button, the nonparametric regression dialog box appears. You can then select the data on the Excel sheet.

The Dependent variable corresponds to the variable that needs to be explained (or the variable to model), which is here the "Weight".

The explanatory variables are the "Height" and the "Age" (quantitative data) and the sex (qualitative data).

The selection has been done by columns as the data start on the first row. The Variable labels option is activated as the first row corresponds to the name of the variables.

We have chosen to use the polynomial function with degree 1, using All the data (except the one that is being predicted), with a weighting based on the Gaussian kernel, and a bandwidth based on the standard deviation of the variables. The latter allows to avoid scaling effects during the computations.

Note: we are very close to the ANCOVA model, the difference being that we do not use the observation in the model that is used to do the corresponding prediction, and that the weights of the observations in the model depend on their distance to the observation to predict.

kern1.gifkern2.gifkern3.gif

The computations begin once you have clicked on OK. The results will then be displayed.

Interpreting the results of a kernel regression

The goodness of fit coefficients allow to evaluate the performance of the model and to possibly compare several models. The R’² (the determination coefficient) gives an idea of the % of the variability of the Weight variable that is explained by the explanatory variables. The closer the R’² to 1, the better the model.

kern4.gif

The table of predictions and residuals allows to visualize for each individual the input data, prediction, and the residual. The residuals vary in absolute values between 0.01 (individual 45) and 40 (individual 195). For the validation data that are displayed in the second part of the table, we notice that the residuals vary also a lot. For individuals 229 and 235 the prediction is excellent. It is a lot worse for the individual 224.

kern5.gif