# VN Regression

### Description

Generates a nonlinear regression based on partial moment quadrant means.

### Usage

1 2 3 4 5 |

### Arguments

`x` |
Independent Variable(s) |

`y` |
Dependent Variable |

`order` |
Controls the number of partial moment quadrant means. Users are encouraged to try different |

`s.t.n` |
Signal to noise parameter, sets the threshold of |

`type` |
To perform logistic regression, set to |

`point.est` |
Returns the fitted value for any value of the independent variable. Use a vector of values for independent varaiables to return the multiple regression fitted value. |

`location` |
Sets the legend location within the plot |

`return.values` |
Defaults to TRUE, set to FALSE in order to avoid displaing all |

`plot` |
To plot regression or not. Defaults to TRUE. |

`residual.plot` |
To plot the fitted values of Y and Y. Defaults to TRUE. |

`threshold` |
Sets the correlation threshold for independent variables. Defaults to 0. |

`dep.order` |
Sets the internal order for VN.dep. Categorical variables typically require |

`precision` |
Increases speed of computation at the expense of precision. 3 settings offered: |

`n.best` |
Sets the number of nearest regression points to use in kernel weighting for multivariate regression. Defaults to 1. |

`text` |
If performing a text classification, set |

`noise.reduction` |
In low signal:noise situations, |

`norm` |
Normalizes regressors between 0 and 1 for multivariate regression when set to |

### Value

UNIVARIATE regression returns the values: `"Fitted"`

for only the fitted values of the DV; `"Fitted.xy"`

for a data frame of IV and fitted values; `"derivative"`

for the coefficient of the IV and its applicable range; `"Point"`

returns the IV point(s) being evaluated; `"Point.est"`

for the predicted value generated; `"regression.points"`

provides the points used in the regression equation for the given order of partitions; `"R2"`

provides the goodness of fit.

MULTIVARIATE regression returns the values: `"Fitted"`

for only the fitted values of the DV; `"Fitted.xy"`

for a data frame of IV and fitted values; `"regression.points"`

provides the points for each IV used in the regression equation for the given order of partitions; `"rhs.partitions"`

returns the partition points for each IV; `"partition"`

returns the DV, quadrant assigned to the observation and fitted value; `"Point"`

returns the IV point(s) being evaluated; `"Point.est"`

returns the predicted value generated; `"equation"`

returns the synthetic X* dimension reduction equation.

### Author(s)

Fred Viole, OVVO Financial Systems

### References

Viole, F. and Nawrocki, D. (2013) "Nonlinear Nonparametric Statistics: Using Partial Moments" http://amzn.com/1490523995

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | ```
set.seed(123)
x<-rnorm(100); y<-rnorm(100)
VN.reg(x,y)
## Manual {order} selection
VN.reg(x,y,order=2)
## Maximum {order} selection
VN.reg(x,y,order='max')
## x-only paritioning (Univariate only)
VN.reg(x,y,type="XONLY")
## Logistic Regression (Univariate only)
VN.reg(x,y,type="LOGIT")
## For Multiple Regression:
x<-cbind(rnorm(100),rnorm(100),rnorm(100)); y<-rnorm(100)
VN.reg(x,y,point.est=c(.25,.5,.75))
## For Multiple Regression based on Synthetic X* (Dimension Reduction):
x<-cbind(rnorm(100),rnorm(100),rnorm(100)); y<-rnorm(100)
VN.reg(x,y,point.est=c(.25,.5,.75),type="CLASS")
## IRIS dataset example:
#Dimension Reduction:
VN.reg(iris[,1:4],iris[,5],type="CLASS",order=5,dep.order=1)
#Multiple Regression:
VN.reg(iris[,1:4],iris[,5],order=2)
## To call fitted values:
VN.reg(x,y)$Fitted
## To call partial derivative (univariate regression only):
x<-rnorm(100); y<-rnorm(100)
VN.reg(x,y)$derivative
``` |