Description Usage Arguments Details Value See Also Examples

Smooth Backfitting for additive models using Nadaraya-Watson estimator.

1 2 3 |

`dat` |
matrix of data. |

`depCol` |
column of |

`m` |
number of grid points. Higher values of |

`windows` |
number of windows. (covariate range width)/ |

`bw` |
bandwidths for the kernel regression smoother. |

`method` |
kernel method. See function |

`mx` |
maximum iterations number. |

`epsilon` |
convergence limit of the iterative algorithm. |

`PP` |
matrix of joint probabilities. |

`G` |
grid on which univariate functions are estimated. |

Bandwidth can be chosen in two different ways: through the argument `bw`

or defining the number of `windows`

into the range of the values of any independent variable through the argument windows (equal to 20 by default). Bandwidth is the width of the windows. Both the parameters `bw`

and `windows`

can be single values, then every smoother has the same bandwidth, or they can be vectors of length equal tu the covariates number to specify different bandwidths for any direction. Higher values of the bandwidth provide smoother estimates.

In applications it could be useful using the same `PP`

matrix for different estimates, e.g. to evaluate the impact of different bandwidths and develop algorithms to select optimal bandwidths (see, for example *Nielsen and Sperlich, 2005, page 52*). This reasoning applies also to the grid `G`

. This is why the possibility to input matrices `G`

and `PP`

as parameters is given. The program creates `G`

and `PP`

if they are not inserted.

`mxhat` |
estimated univariate functions on the |

`m0` |
estimated constant value in the additive model. |

`grid` |
the grid. |

`conv` |
boolean variable indicating whether the convergence has been achieved. |

`nit` |
number of iterations performed. |

`PP` |
matrix of joint probabilities. |

`bw` |
bandwidths used for the kernel regression smoother. |

`sBF-package`

, `K`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
X <- matrix(rnorm(1000), ncol=2)
MX1 <- X[,1]^3
MX2 <- sin(X[,2])
Y <- MX1 + MX2
data <- cbind(Y, X)
est <- sBF(data)
par(mfrow=c(1, 2))
plot(est$grid[,1],est$mxhat[,1], type="l",
ylab=expression(m[1](x[1])), xlab=expression(x[1]))
curve(x^3, add=TRUE, col="red")
plot(est$grid[,2],est$mxhat[,2], type="l",
ylab=expression(m[2](x[2])), xlab=expression(x[2]))
curve(sin(x), add=TRUE, col="red")
par(mfrow=c(1, 1))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.