JeffreyRacine / R-Package-np

R package np (Nonparametric Kernel Smoothing Methods for Mixed Data Types)
https://socialsciences.mcmaster.ca/people/racinej
47 stars 18 forks source link

Multi-dimensional instrument support for Tikhonov method in npregiv #18

Open nishanthdikkala opened 6 years ago

nishanthdikkala commented 6 years ago

Using method="Tikhonov" for npregiv function appears to crash when the instrument is a q-variate data frame where q>1. The following output is seen on the console. " Loading required package: np Nonparametric Kernel Methods for Mixed Datatypes (version 0.60-8) [vignette("np_faq",package="np") provides answers to frequently asked questions] [vignette("np",package="np") an overview] [vignette("entropy_np",package="np") an overview of entropy-based methods] Computing weight matrix and E(y|w)...Error in W.glp(xdat = X.train.numeric, degree = rep(p, NCOL(X.train.numeric))) : Error: degree vector and number of numeric predictors incompatible Calls: npregiv -> Kmat.lp -> W.glp In addition: Warning messages: 1: In if (p < 0) stop(paste("Error: p (order of polynomial) must be a non-negative integer\np is (", : the condition has length > 1 and only the first element will be used 2: In if (p == 0) { : the condition has length > 1 and only the first element will be used 3: In if (p > 0) { : the condition has length > 1 and only the first element will be used Execution halted "