search for: npindexbw

Displaying 9 results from an estimated 9 matches for "npindexbw".

2009 May 11
1
Predict function npindex and npindexbw (PR#13695)
Full_Name: Maxime To Version: 2.9 OS: WIndows Submission from: (NULL) (81.57.236.122) I am using the npindex and npindexbw fubctions of the NP package. I would like to compute the predicted values of the model and tried to use the predict function for this purpose but the function only gives me the summary of the model but no vector of predicted values as with any other model. Simply using the code of the example, it...
2009 Feb 13
0
npindex: specifying manual bandwiths
...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, #Simulation 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) #...
2010 Apr 21
0
problem on semiparametric single index estimator
Dear R-Help, I am Deniz. I am currently trying to replicate a semiparametric sample selection paper and I am working on Klein and Spady estimator. I am using the npindex() and npindexbw() functions. The problem is, I need results for single bandwidth and when I set bandwidth computation to "FALSE" mode, R is not optimizing anything. Here is the code I am using: rp_ksbw<-npindexbw(bws=c(1, -0.1, -0.08, 0.06, -0.14, -0.02, 0.3), formula=(rp$participation ~ (AGE + rp$CH...
2011 Jul 18
0
np package, estimating the standard errors of Klein and Spady's estimator
...would like to estimate the standard errors of Klein and Spady's estimator for that I am using: library(np) N<-100 X<-matrix(c(rnorm(N,1,1), rnorm(N,0,1)), ncol=2) BETA <-matrix(1,2,1) Z<-X%*%BETA L<-rlogis(N,location=0, scale=1) Y <-as.vector(X%*%BETA+L>=0)*1 KS <- npindexbw (xdat=X, ydat=Y, bandwidth.compute=TRUE, method="kleinspady", ckertype="epanechnikov" ) KSi <- npindex(KS, errors=TRUE) se(KSi) But then I get as a result a vector Nx1, which I do not understand what it is, and if I let errors=FALSE then I get a NA as a result. So, how can...
2011 Jul 20
0
np package, KleinSpady estimator, error when I estimate the bootstrapped standard errors
Dear all, I am using np package in order to estimate a model with Klein and Spady estimator. To estimate the model I use KS <- npindexbw (xdat=X, ydat=Y, bandwidth.compute=TRUE, method="kleinspady", optim.maxit=10^3, ckertype="epanechnikov", ckerorder=2) and to estimate beta hats standard errors I use KSi <- npindex(KS, gradients=T, boot.num=300) vcov(KSi) This is fine so far, but if I want to estimate the...
2011 Jul 25
0
error in optimization when I include constant term in Klein and Spady (np package)
...ptimzation? (I already tried all the possible optimization methods) The code that I run is: library(np) N<-250 q<-2 BETA<-matrix(1,3,1) X<-matrix(c(rnorm(N,0,1), rnorm(N,1,1)), ncol=q) X<-cbind(X,1) L<-rlogis(N,location=0, scale=1) Y <-as.vector(X%*%BETA+L>=0)*1 KS <- npindexbw(xdat=X, ydat=Y, bandwidth.compute=TRUE, method="kleinspady", optim.maxit=10^3, ckertype="epanechnikov", ckerorder=2) Thank you Dimitris -- View this message in context: http://r.789695.n4.nabble.com/error-in-optimization-when-I-include-constant-term-in-Klein-and-Spady-np-pac...
2012 Jul 19
1
npindex: fitted values of the function itself?
Dear list, I am using the np package. With the npindex function I estimate a semiparametric single index model using the method of Klein-Spady. P(Z=1|X) = G(X?b) I don?t have any problems to calculated the fitted values and standard errors X?b: bw = npindexbw(xdat=x, ydat=y_bi, method="kleinspady", nmulti=2) model = npindex(bws= bw3, gradients= TRUE, residuals = TRUE, boot.num = 50) x_fit = predict(model, se.fit = TRUE) x_fit_bi= x_fit$fit x_fit_bi_se = x_fit$se.fit However, I also would like to obtain an estimate of G(X?b). For example, afte...
2007 Dec 18
0
Update of the np package (version 0.14-1)
...changed somewhat: both cross-validation and the estimator use a method of shrinking towards the local constant estimator rather than the standard ridge approach that shrinks towards zero * optimised smooth coefficient code, added ridging * fixed bug in uniform CDF kernel * fixed bug where npindexbw would ignore bandwidth.compute = FALSE and compute bandwidths when supplied with a preexisting bw object * now can handle estimation out of discrete support. * summary would misreport the values of discrete scale factors which were computed with bwscaling = TRUE We are grateful to John Fox,...
2007 Dec 18
0
Update of the np package (version 0.14-1)
...changed somewhat: both cross-validation and the estimator use a method of shrinking towards the local constant estimator rather than the standard ridge approach that shrinks towards zero * optimised smooth coefficient code, added ridging * fixed bug in uniform CDF kernel * fixed bug where npindexbw would ignore bandwidth.compute = FALSE and compute bandwidths when supplied with a preexisting bw object * now can handle estimation out of discrete support. * summary would misreport the values of discrete scale factors which were computed with bwscaling = TRUE We are grateful to John Fox,...