[R] npindex: specifying manual bandwiths

Greenerpole greenerpole at gmail.com
Fri Feb 13 17:37:48 CET 2009

Dear R-users, 

I am very enthusiastic about the capacities offered by the np package and
pretty fond of it. 
Nevertheless, trying to estimate Ichimura and Klein and Spady models on my
data, I would like to be able to provide the npindex function with my
guesses for the bandwidth (eventually computed by other means). 
The fact that the option 'bandwidth.compute' in the function npindexbw
exists and seems to be switchable (TRUE/FALSE) makes be believe that it
might be possible, but i couldn't manage so far; could you help ?

For instance, 

n <- 200
x1 <- runif(n, min=-1, max=1)
x2 <- runif(n, min=-1, max=1)
y <- ifelse(x1 + x2 + rnorm(n) > 0, 1, 0)

#Klein and Spady estimation, letting np compute the bandwidth 
#Works fine!

#Klein and Spady estimation, attempting to constrain the bandwidth to .5
#Returns a result with the starting values: no estimation has been done...

Do you know how (or whether) constraining the bandwidth to a given value is
Many thanks, 

View this message in context: http://www.nabble.com/npindex%3A-specifying-manual-bandwiths-tp22000068p22000068.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list