Displaying 20 results from an estimated 10000 matches similar to: "glm"
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] =
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
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
2001 Feb 08
2
dnbinom(,size<1,)=0 (PR#842)
This came up on r-help but indicates a bug.
dnbinom(x,n,p) calls dbinom_raw(n-1,...)
which returns 0 for n<1.
-thomas
---------- Forwarded message ----------
Date: Thu, 08 Feb 2001 17:10:23 +0000
From: Yudi Pawitan <yudi@stat.ucc.ie>
To: Mark Myatt <mark@myatt.demon.co.uk>
Cc: R-Help <r-help@stat.math.ethz.ch>
Subject: Re: [R] Goodness of fit to Poisson / NegBinomial
2017 Sep 14
3
Help understanding why glm and lrm.fit runs with my data, but lrm does not
Dear all,
I am using the publically available GustoW dataset. The exact version I am using is available here: https://drive.google.com/open?id=0B4oZ2TQA0PAoUm85UzBFNjZ0Ulk
I would like to produce a nomogram for 5 covariates - AGE, HYP, KILLIP, HRT and ANT. I have successfully fitted a logistic regression model using the "glm" function as shown below.
library(rms)
gusto <-
2005 Jan 10
1
I have some problem about GLM function.
Dear R-Help
I 'm using GLM function to Modelling. But when I used Gamma Family in GLM, then I can't run.
It was error
> glm(DamageRatio~MinTEMP+MaxTEMP+DayRain+Group1+Group2+Group3+Year,family=Gamma())
Error in eval(expr, envir, enclos) : Non-positive values not allowed for the gamma family
Can Gamma Distribution use data begin 0 ?
and then when I used GLM in S-Plus Program then
2011 Aug 05
1
Goodness of fit of binary logistic model
Dear All,
I have just estimated this model:
-----------------------------------------------------------
Logistic Regression Model
lrm(formula = Y ~ X16, x = T, y = T)
Model Likelihood Discrimination Rank Discrim.
Ratio Test Indexes Indexes
Obs 82 LR chi2 5.58 R2 0.088 C 0.607
0
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
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.
2011 May 18
1
logistic regression lrm() output
Hi, I am trying to run a simple logistic regression using lrm() to calculate a
odds ratio. I found a confusing output when I use summary() on the fit object
which gave some OR that is totally different from simply taking
exp(coefficient), see below:
> dat<-read.table("dat.txt",sep='\t',header=T,row.names=NULL)
> d<-datadist(dat)
> options(datadist='d')
2017 Sep 14
0
Help understanding why glm and lrm.fit runs with my data, but lrm does not
> On Sep 14, 2017, at 12:30 AM, Bonnett, Laura <L.J.Bonnett at liverpool.ac.uk> wrote:
>
> Dear all,
>
> I am using the publically available GustoW dataset. The exact version I am using is available here: https://drive.google.com/open?id=0B4oZ2TQA0PAoUm85UzBFNjZ0Ulk
>
> I would like to produce a nomogram for 5 covariates - AGE, HYP, KILLIP, HRT and ANT. I have
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 -
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
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 :
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 Nov 09
2
ks.test
Dear R-List members,
I want to check if a set of measurements follows better a
gamma or a lognormal distribution (see data below).
Using shapiro.test I can test for normality (shapiro.test(log
(Lt)).
To test for gamma (and normal) distribution I would use
ks.test but I need to specify its shape and scale. How should
I calculate these values in R?
I tried
> Lt.fit <- glm(Lt ~ 1,
2017 Sep 14
1
Help understanding why glm and lrm.fit runs with my data, but lrm does not
Fixed 'maxiter' in the help file. Thanks.
Please give the original source of that dataset.
That dataset is a tiny sample of GUSTO-I and not large enough to fit this
model very reliably.
A nomogram using the full dataset (not publicly available to my knowledge)
is already available in http://biostat.mc.vanderbilt.edu/tmp/bbr.pdf
Use lrm, not lrm.fit for this. Adding maxit=20 will
2010 Dec 09
1
error in lrm( )
Dear Sir or Madam?
I am a doctor of urology,and I am engaged in developing a nomogram of bladder cancer. May I ask for your help on below issue?
I set up a dataset which include 317 cases. I got the Binary Logistic Regression model by SPSS.And then I try to reconstruct the model
?lrm(RECU~Complication+T.Num+T.Grade+Year+TS)? by R-Project,and try to internal validate the model through
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