similar to: Negative intercept in glm poisson model

Displaying 20 results from an estimated 8000 matches similar to: "Negative intercept in glm poisson model"

2004 Nov 25
1
Error using glm with poisson family and identity link
Hi all I'm trying to use the function glm from the MASS package to do the following fit. fit <- glm(FP ~ rand, data = tab, family = poisson(link = "identity"), subset = rand >= 1) (FP is >= 0) but I get the following error Error: no valid set of coefficients has been found:please supply starting values In addition: Warning message: NaNs produced in: log(x) in contrast
2004 Oct 15
8
Testing for normality of residuals in a regression model
Hi all, Is it possible to have a test value for assessing the normality of residuals from a linear regression model, instead of simply relying on qqplots? I've tried to use fitdistr to try and fit the residuals with a normal distribution, but fitdsitr only returns the parameters of the distribution and the standard errors, not the p-value. Am I missing something? Cheers, Federico
2012 Jun 21
2
MGCV: Use of irls.reg option
Hi, In the help files in the ?mgcv package for the gam.control() function, there is an option irls.reg. The help files describe this option as: For most models this should be 0. The iteratively re-weighted least squares method by which GAMs are fitted can fail to converge in some circumstances. For example, data with many zeroes can cause problems in a model with a log link, because a mean of
2004 Feb 23
1
Segmentation fault with fix() (PR#6605)
Full_Name: Federico Gherardini Version: 1.8.1 OS: Gentoo linux Submission from: (NULL) (81.208.36.89) When I use fix() to edit a matrix R immediately quits with a segmentation fault if I use the copy button in the graphical device window. Clicking on the name of the variables completely messes up the screen too. In this case you have to close the grahpic device and call fix() again. I've
2004 Oct 26
3
Combining columns of different length
Hi, you can use this simple function: add.col<-function(df, new.col) {n.row<-dim(df)[1] length(new.col)<-n.row cbind(df, new.col) } see this example: > x<-cbind(c(1,2,3),c(4,5,6)) > x [,1] [,2] [1,] 1 4 [2,] 2 5 [3,] 3 6 > y<-c(7,8) > y [1] 7 8 > add.col<-function(df, new.col)
2000 Dec 19
1
Bug in glm.fit() or plot.lm() (PR#778)
Here's a bug one of my students noticed. When you call plot() on a glm object, plot.lm gets called. The second plot it shows is supposed to give a normal QQ plot of the standard deviance residuals, but it doesn't. The glm object created by glm.fit returns something (the IRLS weights?) in fit$weights which plot.lm takes as observation weights, so you get strange residuals in the QQ
2006 Jan 18
4
negative predicted values in poisson glm
Dear R helpers, running the following code of a glm model of the family poisson, gives predicted values < 0. Why? library(MASS) library(stats) library(mvtnorm) library(pscl) data(bioChemists) poisson_glm <- glm(art ~ fem + mar + kid5 + phd + ment, data = bioChemists, family = poisson) predicted.values = predict(poisson_glm) range(predicted.values) Thank you in advance for any hints.
2004 Jul 28
3
Another big data size problem
Hi all, I'm trying to read a 1220 * 20000 table in R but I'm having lot of problems. Basically what it happens is that R.bin starts eating all my memory until it gets about 90%. At that point it locks itself in a uninterruptible sleep status (at least that's what top says) where it just sits there barely using the cpu at all but keeping its tons of memory. I've tried with
2010 Jun 21
1
glm, poisson and negative binomial distribution and confidence interval
Dear list, I am using glm's to predict count data for a fish species inside and outside a marine reserve for three different methods of monitoring. I run glms and figured out the best model using step function for each methods used. I predicted two values for my fish counts inside and outside the reserve using means of each of the covariates (using predict() ) therefore I have only one value
2005 Jul 15
1
Padding in lattice plots
Hi all, I've used the split argument to print four lattice plots on a single page. The problem now is that I need to reduce the amount of white space between the plots. I've read other mails in this list about the new trellis parameters layout.heights and layout.widhts but I haven't been able to use them properly. I've tried to input values between 0 and 1 as the padding value
2012 Jul 18
1
How does "rlm" in R decide its "w" weights for each IRLS iteration?
Hi all, I am also confused about the manual: a. The input arguments: wt.method are the weights case weights (giving the relative importance of case, so a weight of 2 means there are two of these) or the inverse of the variances, so a weight of two means this error is half as variable? w (optional) initial down-weighting for each case. init (optional) initial values for the
2005 Nov 21
1
singular convergence with lmer function i lme4
Dear R users, I am trying to fit a GLMM to the following dataset; tab a b c 1 1 0.6 199320100313 2 1 0.8 199427100412 3 1 0.8 199427202112 4 1 0.2 199428100611 5 1 1.0 199428101011 6 1 0.8 199428101111 7 0 0.8 199527103011 8 1 0.6 199527200711 9 0 0.8 199527202411 10 0 0.6 199529100412 11 1 0.2 199626201111 12 2 0.8 199627200612 13 1 0.4 199628100111 14 1 0.8
2007 Apr 08
1
Relative GCV - poisson and negbin GAMs (mgcv)
I am using gam in mgcv (1.3-22) and trying to use gcv to help with model selection. However, I'm a little confused by the process of assessing GCV scores based on their magnitude (or on relative changes in magnitude). Differences in GCV scores often seem "obvious" with my poisson gams but with negative binomial, the decision seems less clear. My data represent a similar pattern as
2002 Jun 06
1
generating overdispersed poisson & negative binomial data
I would like to try a simple parametric bootstrap, but unfortunately (stupidly?) my models are "overdispersed" gams & glms. I'm hoping for a function that generates overdispersed poisson or negative binomial data with a given mean, scale (& shape parameter). The loose definition I'm using is overdispersed poisson produces integer values with variance=const*mean &
2003 Oct 29
1
One inflated Poisson or Negative Binomal regression
Hello I am interested in Poisson or (ideally) Negative Binomial regression with an inflated number of 1 responses I have seen JK Lindsey's fmr function in the gnlm library, which fits zero inflated Poisson (ZIP) or zero inflated negative binomial regression, but the help file states that for ' Poisson or related distributions the mixture involves the zero category'. I had thought
2009 Jan 20
1
Poisson GLM
This is a basics beginner question. I attempted fitting a a Poisson GLM to data that is non-integer ( I believe Poisson is suitable in this case, because it is modelling counts of infections, but the data collected are all non-negative numbers with 2 decimal places). My question is, since R doesn't return an error with this glm fitting, is it important that the data is non-integer. How does
2004 Feb 02
1
glm.poisson.disp versus glm.nb
Dear list, This is a question about overdispersion and the ML estimates of the parameters returned by the glm.poisson.disp (L. Scrucca) and glm.nb (Venables and Ripley) functions. Both appear to assume a negative binomial distribution for the response variable. Paul and Banerjee (1998) developed C(alpha) tests for "interaction and main effects, in an unbalanced two-way layout of counts
2006 Feb 06
3
power and sample size for a GLM with poisson response variable
Hi all, I would like to estimate power and necessary sample size for a GLM with a response variable that has a poisson distribution. Do you have any suggestions for how I can do this in R? Thank you for your help. Sincerely, Craig -- Craig A. Faulhaber Department of Forest, Range, and Wildlife Sciences Utah State University 5230 Old Main Hill Logan, UT 84322 (435)797-3892
2008 Mar 18
1
glm poisson, method='ML' (PR#10985)
Full_Name: saraux Version: 2.6.1 OS: Windows vista Submission from: (NULL) (193.157.180.37) I would like to compute a glm with a distribution of poisson, using a maximum of likelihood method. But it seems not to work with a distribution of poisson. The same code with another distrubution (binomial for example) works. Here is the command I typed:
2000 Mar 16
2
glm: offset in poisson
R-users, Can an offset term be included in a Poisson model? I get an error message when trying that: >r3o <- glm(tax ~ areal + offset(o), family=poisson) Error in (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y, : inner loop 1; can't correct step size In addition: Warning message: Step size truncated due to divergence in: (if (is.empty.model(mt))