Displaying 20 results from an estimated 30000 matches similar to: "Help with na.action option"
2007 Aug 13
1
GML with tweedie: AIC=NA
Dear Catarina,
I prefer to leave the AIC value as NA for the tweedie GLM family
because it takes extra time to compute and is only occasionally
wanted. It's easy to compute the AIC yourself using the dtweedie()
function of the tweedie package.
Best wishes
Gordon
At 03:05 AM 14/08/2007, Catarina Miranda wrote:
>Dear Gordon;
>
>I have also sent this email to R help mailing list,
2005 Apr 13
3
A suggestion for predict function(s)
Maybe a useful addition to the predict functions would be to return the
values of the predictor variables. It just (unless there are problems)
requires an extra line. I have inserted an example below.
"predict.glm" <-
function (object, newdata = NULL, type = c("link", "response",
"terms"), se.fit = FALSE,
2006 Jan 15
1
problems with glm
Dear R users,
I am having some problems with glm. The first is an error message "subscript out of bounds". The second is the fact that reasonable starting values are not accepted by the function.
To be more specific, here is an example:
> success <- c(13,12,11,14,14,11,13,11,12)
> failure <- c(0,0,0,0,0,0,0,2,2)
> predictor <- c(0,80*5^(0:7))
>
2002 Jun 20
1
Possible bug with glm.nb and starting values (PR#1695)
Full_Name: Ben Cooper
Version: 1.5.0
OS: linux
Submission from: (NULL) (134.174.187.90)
The help page for glm.nb (in MASS package) says that it takes "Any other
arguments for the glm() function except family"
One such argument is start "starting values for the parameters in the linear
predictor."
However, when called with starting values glm.nb returns:
Error in
2007 May 01
1
Levels attribute in integer columns created by model.frame()
The following is evidence of what is surely an undesirable feature.
The issue is the handling, in calls to model.frame(), of an
explanatory variable that has been derived as an unclassed
factor. (Ross Darnell drew this to my attention.)
## Data are slightly modified from p.191 of MASS
> worms <- data.frame(sex=gl(2,6), Dose=factor(rep(2^(0:5),2)),
+
2009 Apr 03
1
Trouble extracting graphic results from a bootstrap
Hi,
I'm trying to extract a histogram over the results from a bootstrap. However
I keep receiving the error message "Error in hist.default(boot.lrtest$ll,
breaks = "scott") : 'x' must be numeric".
The bootstrap I'm running looks like:
> boot.test <- function(data, indeces, maxit=20) {
+ y1 <- fit1+e1[indeces]
+ mod1 <- glm(y1 ~ X1-1, maxit=maxit)
+
2012 Apr 14
1
R Error/Warning Messages with library(MASS) using glm.
Hi there,
I have been having trouble running negative binomial regression (glm.nb)
using library MASS in R v2.15.0 on Mac OSX.
I am running multiple models on the variables influencing the group size of
damselfish in coral reefs (count data). For total group size and two of my
species, glm.nb is working great to deal with overdispersion in my count
data. For two of my species, I am getting a
2009 Aug 13
2
glm.nb versus glm estimation of theta.
Hello,
I have a question regarding estimation of the dispersion parameter (theta)
for generalized linear models with the negative binomial error structure. As
I understand, there are two main methods to fit glm's using the nb error
structure in R: glm.nb() or glm() with the negative.binomial(theta) family.
Both functions are implemented through the MASS library. Fitting the model
using these
2010 Dec 06
1
waldtest and nested models - poolability (parameter stability)
Dear All,
I'm trying to use waldtest to test poolability (parameter stability) between
two logistic regressions. Because I need to use robust standard errors
(using sandwich), I cannot use anova. anova has no problems running the
test, but waldtest does, indipendently of specifying vcov or not. waldtest
does not appear to see that my models are nested. H0 in my case is the the
vector of
1999 May 19
1
shell command
Using R (version 0.63.3) for MS windows, I try the following command
> shell(paste("cd ",getenv("RHOME"),sep=""))
which replies with an error message
Too many parameters - FILES\RW0633
which appears to suggest that the space if the path name is causing
difficulties to the cd command. getenv returns
> getenv("RHOME")
RHOME
2002 Feb 28
1
get deviance from glm() for given parameter values
Dear all,
I would like to get glm() return its results (at least the deviance) for
some given parameter values (ie without actually fitting the model). I
tried to set `maxit = 0' but this does not work, eg:
> glm(y ~ x, start = c(1, 1), maxit = 0)
Error in glm.control(...) : maximum number of iterations must be > 0
Any idea?
Thanks in advance.
Emmanuel Paradis
2002 Sep 20
1
warning in binomial analysis
Hi,
I have make an analise with presence and absence, y=(1 e 0).
I have a area continuous data and a sp data with 25 levels. I have 300 points.
When I make
glm((presenca/peso)~area,weights=peso,family=binomial,maxit=1000)
where
presenca is 0 or 1.
peso is the unit = 1.
area is the continuous data.
The analysis is OK.
When I put the sp and interactions in analysis this warning appear.
2010 May 30
1
Gamma regression doesn't converge
When I ran a Gamma regression in SAS, the algorithm converged. When I ran it
in R, it keeps uncoverged even if I used 10000 iterations. What was wrong?
I used the following code in R:
glm(y ~ x1 x2 x3, control=glm.control(maxit=10000), data,
family=Gamma(link="log"))
[[alternative HTML version deleted]]
2007 Dec 12
1
Defining the "random" term in function "negbin" of AOD package
I have tried glm.nb in the MASS package, but many models (I have 250 models
with different combinations of predictors for fish counts data) either fail
to converge or even diverge.
I'm attempting to use the negbin function in the AOD package, but am unsure
what to use for the "random" term, which is supposed to provide a right hand
formula for the overdispersion parameter.
2007 May 01
0
[Fwd: Re: [R-downunder] Beware unclass(factor)] (PR#9641)
It really is unclear what is claimed to be a bug here. But see
https://stat.ethz.ch/pipermail/r-devel/2007-May/045592.html
for why the bug is not in R: your old and new data do not match.
Your fit is to a category.
[The problem with the web interface to R-bugs was reported last week: it
is being worked on.]
On Mon, 30 Apr 2007, r.darnell at uq.edu.au wrote:
> This is a multi-part
1999 Jun 18
1
R INSTALL -l
The FAQ says in
[5.2 How can add-on packages be installed?]
to install a package to a private tree, use
[$ R INSTALL -l lib pkgdir_1 ... pkgdir_n]
where lib gives the path to the library tree to install to.
which, for me, returns
Package '-l' does not exist. Has there been a change?
Thank you
Ross
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
|Ross
2005 Apr 14
1
predict.glm(..., type="response") loses names (was RE: [R] A sugg estion for predict function(s))
> From: Ross Darnell
>
> Liaw, Andy wrote:
> >>From: Liaw, Andy
> >>
> >>
> >>>From: Ross Darnell
> >>>
> >>>A good point but what is the value of storing a large set of
> >>>predicted
> >>>values when the values of the explanatory variables are lost
> >>>(predicted
>
2002 Apr 15
1
glm link = logit, passing arguments
Hello R-users.
I haven't use R for a life time and this might be trivial - I hope you do
not mind.
I have a questions about arguments in the Glm-function. There seems to be
something that I cannot cope.
The basics are ok:
> y <- as.double(rnorm(20) > .5)
> logit.model <- glm(y ~ rnorm(20), family=binomial(link=logit), trace =
TRUE)
Deviance = 28.34255 Iterations - 1
2010 Jul 09
1
Appropriate tests for logistic regression with a continuous predictor variable and Bernoulli response variable
I have a data with binary response variable, repcnd (pregnant or not) and one predictor continuous variable, svl (body size) as shown below. I did Hosmer-Lemeshow test as a goodness of fit (as suggested by a kind “R-helper” previously). To test whether the predictor (svl, or body size) has significant effect on predicting whether or not a female snake is pregnant, I used the differences between
2003 Jan 22
1
negative multinomial regression models
Hello,
I''ve spent a lot of time during the past month trying to get negative
multinomial regression models for clustered event counts as described in
(Guang Guo. 1996. "Negative Multinomial Regression Models For Clustered
Event Counts." Sociological Methodology 26: 113-132., abstract at
http://depts.washington.edu/socmeth2/4abst96.htm) implemented in R. A
FORTRAN version of the