NWW: Nadaraya-Watson weights.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/NWW.R

Description

Computes the Nadaraya-Watson weights.

Usage

1
NWW(covariate, x, kernel = "gaussian", bw)

Arguments

covariate

Covariate values for obtaining weights.

x

Covariate value to compute the weight at.

kernel

A character string specifying the desired kernel. See details below for possible options. Defaults to "gaussian" where the gaussian density kernel will be used.

bw

A single numeric value to compute a kernel density bandwidth.

Details

Possible options for argument window are "gaussian", "epanechnikov", "tricube", "boxcar", "triangular", "quartic" or "cosine".

Value

A vector with Nadaraya-Watson weights.

Author(s)

Luis Meira-Machado, Marta Sestelo and Gustavo Soutinho.

See Also

LLW

Examples

1
NWW(covariate = colonIDM$age, x=40, kernel = "gaussian", bw = 3)

sestelo/idmsurv documentation built on June 29, 2021, 3:04 p.m.