Hi, I ran a negative binomial regression (NBR) using the Zelig-package and the negbin model. When I then try to use the simumlation approach using the setx () and sim() functions to calculate expected values and first difference for different levels of one of my independent variables, I get 50 errors warnings, telling me that the calculation rpois produced NAs. However, the data I use doesn't have any NAs. Does this mean that the NBR-model is the wrong model for this data? Thanks in advance. ___________________________________________________________ Preisknaller: WEB.DE DSL Flatrate f?r nur 16,99 Euro/mtl.! http://produkte.web.de/go/02/
Dear Clara, could you, please, share the summary() of your data. bests milton 2009/12/30 Clara Brück <clara_brueck@web.de>> Hi, > > I ran a negative binomial regression (NBR) using the Zelig-package and the > negbin model. > When I then try to use the simumlation approach using the setx () and sim() > functions to calculate expected values > and first difference for different levels of one of my independent > variables, I get 50 errors warnings, telling me that the calculation rpois > produced NAs. However, the data I use doesn't have any NAs. > Does this mean that the NBR-model is the wrong model for this data? > > Thanks in advance. > > > > ___________________________________________________________ > Preisknaller: WEB.DE <http://web.de/> DSL Flatrate für nur 16,99 > Euro/mtl.! > http://produkte.web.de/go/02/ > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Perhaps this will give a clue: rpois(1,-1) [1] NaN Warning message: In rpois(1, -1) : NAs produced # (lambda needs to be nonnegative) -Peter Ehlers Clara Br?ck wrote:> Hi, > > I ran a negative binomial regression (NBR) using the Zelig-package and the negbin model. > When I then try to use the simumlation approach using the setx () and sim() functions to calculate expected values > and first difference for different levels of one of my independent variables, I get 50 errors warnings, telling me that the calculation rpois produced NAs. However, the data I use doesn't have any NAs. > Does this mean that the NBR-model is the wrong model for this data? > > Thanks in advance. > > > > ___________________________________________________________ > Preisknaller: WEB.DE DSL Flatrate f?r nur 16,99 Euro/mtl.! > http://produkte.web.de/go/02/ > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >-- Peter Ehlers University of Calgary 403.202.3921