0

I've been trying to use the intReg package in R, but I got this as a result:

> y <- cbind(dataH$lb, dataH$ub)
> fit.int <- intReg(y ~ logSpread + logdepthS + logdepthO + last + ret + volatility + loghiddenVolS + loghiddenVolO + loghft1S + loghft1O + hft2S + hft2O + hft3S + hft3O + preEarnings + postEarnings, data = dataH)  
> summary(fit.int)
Error in class(coefValues) <- c("coef.intReg", class(coefValues)) : 
  attempt to set an attribute on NULL

> coef(fit.int)
Error in class(coefValues) <- c("coef.intReg", class(coefValues)) : 
  attempt to set an attribute on NULL

> print(coef(fit.int))
Error in class(coefValues) <- c("coef.intReg", class(coefValues)) : 
  attempt to set an attribute on NULL

> fit.int
Interval regression

BHHH maximisation, 0 iterations
Return code 100: Initial value out of range.

> print(coef(fit.int, boundaries = TRUE))
Error in class(coefValues) <- c("coef.intReg", class(coefValues)) : 
  attempt to set an attribute on NULL

Any idea what's going on?

Roman Luštrik
  • 69,533
  • 24
  • 154
  • 197
jtanman
  • 654
  • 1
  • 4
  • 18
  • When you're using formula, put all the data in the same data.frame. Next time I suggest you make a reproducible example: http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Roman Luštrik Apr 04 '14 at 06:51
  • Thanks for the formatting help. I'm trying to copy the example in the intReg package by having y outside of the data frame. – jtanman Apr 04 '14 at 07:17
  • Try assigning it to your data.frame and try again. It's not that hard. `dataH$y <- y`. :) – Roman Luštrik Apr 04 '14 at 09:30
  • The example works for me, even when I do `Kakadu$lb <- lb; Kakadu$ub <- ub;m <- intReg(with(Kakadu, cbind(lb, ub)) ~ sex + log(income) + age + schooling + recparks + jobs + lowrisk + wildlife + future + aboriginal + finben + mineparks + moreparks + gov + envcon + vparks + tvenv + major, data=Kakadu)`. – Roman Luštrik Apr 04 '14 at 09:38
  • Yea, I also did try having it in the data frame, but it still didn't work. – jtanman Apr 15 '14 at 18:48

0 Answers0