censReg error
Created by: jsta
I have tracked down the source of the error reported at https://github.com/USGS-R/rloadest/issues/24 to the censReg function (https://github.com/USGS-R/rloadest/blob/master/R/loadReg.R#L244).
After installing from GRAN (2017-07-22) and running example("censReg", "smwrQW")
the first time, I see:
censRg> set.seed(345) censRg> X <- runif(24, 1, 5) censRg> Y <- X/2 + rnorm(24) censRg> lm(Y ~ X) # the uncensored regression
Call: lm(formula = Y ~ X) Coefficients: (Intercept) X
-0.2342 0.4686
censRg> censReg(as.lcens(Y, 1) ~ X) # censored at 1 Error in as.character(control) : cannot coerce type 'NULL' to vector of type 'character' Error during wrapup: cannot coerce type 'NULL' to vector of type 'character'
On the second attempt I see:
Error in as.character(control) : cannot coerce type 'NULL' to vector of type 'character' Error during wrapup: cannot coerce type 'NULL' to vector of type 'character'
My global environment is then "corrupted" and calling any function from any package returns the error above.