Learn R Programming

condSURV (version 2.0.4)

NWW: Nadaraya-Watson weights.

Description

Computes the Nadaraya-Watson weights.

Usage

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

Value

A vector with Nadaraya-Watson weights.

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.

Author

Luis Meira-Machado and Marta Sestelo

Details

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

See Also

LLW

Examples

Run this code

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

Run the code above in your browser using DataLab