Displaying 20 results from an estimated 10000 matches similar to: "glm -gamma errors"
2000 Jan 31
2
glm
I've downloaded R for windows (9.0.1) and it is great! I've
converted all my lecture notes for my GLM course to run on R (they are
available on my web page below). I must admit I particularly like the
default contrast options, which are identical to GLIM. Also I like the
gl function - very useful! I have a couple of questions/bugs:
1. predict.glm doesn't work, but predict.lm does -
1998 Mar 20
1
R-beta: glm
I am new to R so may well have missed the point somewhere. I would like to
use an exponential error in my generalized linear model. It seems natural
to restrict the Gamma family to do this ( and as one might in GLIM) by
specifying the scale. This does not seem possible in R . Have I missed
something?
Sorry to raise such a trivial point but I am keen to specify the scale
G.Janacek
2000 Jan 08
2
MASS glm.nb: Offset fails
I came to R from GLIM and its glm. My data sets (ecological community data)
are severely over-dispersed, and so I was delighted to find out that the MASS
library has glm.nb which is an advancement from the GLIM macros I had used
(N.E.Breslow, Applied Statistics 33, 38--44; 1984). However, I need to use
offset, but that failed.
I am not (yet --- hopefully) fluent enough in R to be able to
2002 Mar 01
1
glm with binomial errors in R and GLIM
Hi all,
In my continuous transition of GLIM to R I try to make a glm with binomial
errors.
The data file have 3 vectors:
h -> the factor that is ajusted (have 3 levels)
d -> number of animais alive (the response)
n -> total number of animals
To test proportion of alive, make d/n.
In GLIM:
$yvar d$
$error binomial n$
$fit +h$
scale deviance = 25.730 (change = -9.138) at cycle 4
2002 Jan 15
2
returned values of glim() in S PLus and glm() in R
Dear Experts,
In glim() of S Plus, one of the returned values is "var", the estimated
variance matrix of coefficients. However, in glm() of R (there is no
glim() in R), "var" is not one of the returned values. Anyone know what
could I get the varience matrix of coefficients in glm() in R?
As a novice in R and S+, I'd appreciate your help
Sincerely,
Charlie Liu
2002 Jan 18
3
How do I know if the deviance of a glm fit was fixed?
I'm writing functions that need to behave differently for
GLMs like binomial and Poisson with fixed deviance, and those like
normal or gamma or quasi where the deviance is estimated from the
data. Given a glm object, is there a simple way to tell this
directly, or do I have to look at the name of the family?
Duncan Murdoch
2007 May 25
1
Estimation of Dispersion parameter in GLM for Gamma Dist.
Hi All,
could someone shed some light on what the difference between the
estimated dispersion parameter that is supplied with the GLM function
and the one that the 'gamma.dispersion( )' function in the MASS
library gives? And is there consensus for which estimated value to
use?
It seems that the dispersion parameter that comes with the summary
command for a GLM with a Gamma dist. is
2012 Sep 25
1
appropriate test in glm when the family is Gamma
Dear R users,
Which test is most appropriate in glm when the family is Gamma?
In the help page of anova.glm, I found the following
?For models with known dispersion (e.g., binomial and Poisson fits) the chi-squared test is most appropriate, and for those with dispersion estimated by moments (e.g., gaussian, quasibinomial and quasipoisson fits) the F test is most appropriate.?
My questions :
2009 Jul 15
1
GLM Gamma Family logLik formula?
Hello all,
I was wondering if someone can enlighten me as to the difference
between the logLik in R vis-a-vis Stata for a GLM model with the gamma
family.
Stata calculates the loglikelihood of the model as (in R notation)
some equivalent function of
-1/scale * sum(Y/mu+log(mu)+(scale-1)*log(Y)+log(scale)+scale*lgamma(1/scale))
where scale (or dispersion) = 1, Y = the response variable, and mu
2000 Apr 19
1
scale factors/overdispersion in GLM: possible bug?
I've been poking around with GLMs (on which I am *not* an expert) on
behalf of a student, particularly binomial (standard logit link) nested
models with overdispersion.
I have one possible bug to report (but I'm not confident enough to be
*sure* it's a bug); one comment on the general inconsistency that seems to
afflict the various functions for dealing with overdispersion in GLMs
2001 Feb 26
1
glm: family=exponential() or family=Gamma(alpha=1)?
In glm, is there a way to specify the family
to be exponential, or Gamma but with alpha=1?
This is required by Dobson Exercise 4.3d, page 48.
But without specifying alpha=1, the asnwer is the same
as in the book.
If reply to the list, please cc me a copy.
Thanks.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2003 Dec 02
2
: GLIM PROBLEMS
Hi all
I have another GLIM question.
I have been using R as well as Genstat (version 6) in order to fit
GLIM models to the data (displayed below).
The same models are fitted but the answers supplied by the two
packages are not the same.
Why? Can anyone help?
A discription of the data and the type of model/s fitted can be found
below.
Regards
Allan
The
2002 Apr 22
3
glm() function not finding the maximum
Hello,
I have found a problem with using the glm function with a gamma
family.
I have a vector of data, assumed to be generated by a gamma distribution.
The parameters of this gamma distribution are estimated in two ways (i)
using the glm() function, (ii) "by hand", using the optim() function.
I find that the -2*likelihood at the maximum found by (i) is substantially
larger than that
2010 Nov 29
2
accuracy of GLM dispersion parameters
I'm confused as to the trustworthiness of the dispersion parameters
reported by glm. Any help or advice would be greatly appreciated.
Context: I'm interested in using a fitted GLM to make some predictions.
Along with the predicted values, I'd also like to have estimates of
variance for each of those predictions. For a Gamma-family model, I believe
this can be done as Var[y] =
2011 Jul 14
1
glm() scale parameters and predicted Values
In glm() you can use the summary() function to recover the shape parameter (the reciprocal of the dispersion parameter). How do you recover the scale parameter? Also, in the given example, how I estimate and save the geometric mean of the predicted values? For a simple model you can use fitted() or predicted() functions. I will appreciate any help.
?
?
?
#Call required R packages
require(plyr)?
2001 May 17
1
glm
Hello,
I need to fit a generalized linear model with a Chi2 (6 ddl) as error distribution and with "log" as link function. I have looked in help(family) and maybe I could use Gamma(link="log") but I do not know if I can, and where I can define the shape and the scale arguments of the gamma distribution. Maybe there is another may to do that?
Could someone explain me how can I
2003 Jun 10
2
fitting data to exponential distribution with glm
I am learning glm function, but how do you fit data using exponential
distribution with glm?
In the help file, under "Family Objects for Models", no ready made option
seems available for the distribution as well as for other distributions
satisfying GLM requirements not listed there.
2002 Aug 22
2
Calculating dispersion in glm
Hi all,
How is dispersion calculated within the glm function in R ?
Cheers
_________________________________________________________________
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body",
2004 Mar 16
2
glm questions
Greetings, everybody. Can I ask some glm questions?
1. How do you find out -2*lnL(saturated model)?
In the output from glm, I find:
Null deviance: which I think is -2[lnL(null) - lnL(saturated)]
Residual deviance: -2[lnL(fitted) - lnL(saturated)]
The Null model is the one that includes the constant only (plus offset
if specified). Right?
I can use the Null and Residual deviance to
2004 Nov 15
3
glim in R?
After some futile searches, I decided to ask the list to see
if any of the sages out there would have an answer:
I have a function I wrote a few years ago in S, which calls
glim numerous times. I'd like to port it to R, but glm
works differently from glim, which takes as part of its
input an X design matrix. I probably could write a function
to convert glim to glm, but hope this