NLhat: Compute fitted values from kernel regression of x on y and y...

View source: R/NLhat.R

NLhatR Documentation

Compute fitted values from kernel regression of x on y and y on x

Description

This is an auxiliary function for ‘gmcmtxBlk.’ It uses two numerical vectors (x, y) of same length to create two vectors (xhat, yhat) of fitted values using nonlinear kernel regressions. It uses package ‘np’ called by kern function to kernel regress x on y, and conversely y on x. It uses the option ‘residuals=TRUE’ of ‘kern’

Usage

NLhat(x, y)

Arguments

x

A column vector of x data

y

A column vector of y data

Value

two vectors named xhat and yhat for fitted values

Author(s)

Prof. H. D. Vinod, Economics Dept., Fordham University, NY

See Also

See Also as gmcmtxBlk.

Examples



## Not run: 
set.seed(34);x=sample(1:15);y=sample(1:15)
NLhat(x,y)
## End(Not run)


generalCorr documentation built on Oct. 10, 2023, 1:06 a.m.