Displaying 20 results from an estimated 40000 matches similar to: "weighted.residuals() ?"
2010 Aug 20
3
Deviance Residuals
Dear all,
I am running a logistic regression and this is the output:
glm(formula = educationUniv ~ brncntr, family = binomial)
Deviance Residuals:
Min 1Q Median 3Q Max # ???? ????? ?? ????????
-0.8825 -0.7684 -0.7684 1.5044 1.6516
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.06869 0.01155 -92.487 <2e-16 ***
brncntrNo
2011 Mar 14
3
Standardized Pearson residuals
Is there any reason that rstandard.glm doesn't have a "pearson" option?
And if not, can it be added?
Background: I'm currently teaching an undergrad/grad-service course from
Agresti's "Introduction to Categorical Data Analysis (2nd edn)" and
deviance residuals are not used in the text. For now I'll just provide
the students with a simple function to use, but I
2004 Mar 23
1
influence.measures, cooks.distance, and glm
Dear list,
I've noticed that influence.measures and cooks.distance gives different
results for non-gaussian GLMs. For example, using R-1.9.0 alpha
(2003-03-17) under Windows:
> ## Dobson (1990) Page 93: Randomized Controlled Trial :
> counts <- c(18,17,15,20,10,20,25,13,12)
> outcome <- gl(3,1,9)
> treatment <- gl(3,3)
> glm.D93 <- glm(counts ~ outcome +
2005 Jun 21
0
weighted.residuals for glm objects (PR#7961)
Full_Name: Henric Nilsson
Version: 2.2.0 (2005-06-20 r34776)
OS: Windows 2000
Submission from: (NULL) (213.115.23.26)
The help page for `weighted.residuals' states that the function can be used with
both `lm' and `glm' objects. However, it's unclear what's meant by the following
passage
"Weighted residuals are the usual residuals Ri, multiplied by wi^0.5, where wi
are
2005 Apr 23
3
Enhanced version of plot.lm()
I propose the following enhancements and changes to plot.lm(),
the most important of which is the addition of a Residuals vs
Leverage plot.
(1) A residual versus leverage plot has been added, available
by specifying which = 5, and not included as one of the default
plots. Contours of Cook's distance are included, by default at
values of 0.5 and 1.0. The labeled points, if any, are those
2011 Mar 16
1
Standardized Pearson residuals (and score tests)
Hi Peter and others,
If it helps, I wrote a small function glm.scoretest() for the statmod
package on CRAN to compute score tests from glm fits. The score test for
adding a covariate, or any set of covariates, can be extracted very neatly
from the standard glm output, although you probably already know that.
Regards
Gordon
---------------------------------------------
Professor Gordon K
2006 Feb 27
1
Different deviance residuals in a (similar?!?) glm example
Dear R-users,
I would like to show you a simple example that gives an overview of one
of my current issue.
Although my working setting implies a different parametric model (which
cannot be framed in the glm), I guess that what I'll get from the
following example it would help for the next steps.
Anyway here it is.
Firstly I simulated from a series of exposures, a series of deaths
(given a
2002 Nov 24
1
Understanding function residuals()
Hello:
I am trying to understand why glm() does not replicate the results in
Dobson, "Introduction to Generalized Linear Models," pp. 17-20.
I set up the following model. The variable CONDT is assumed as Poisson and
the objective is to estimate the expected value.
The data (chronic medical conditions among women in Australia) is as
follows:
CONDT <- c(0, 1, 1, 0, 2, 3, 0, 1,
2001 Nov 16
2
pearson residuals in glm for binomial response (PR#1175)
R version 1.3.0
OS: SunOS 5.7, but I think the same problem occurs with Windows
An incorrect formula seems to be used to calculate the pearson residuals
for a generalized linear model with a binomial response. Here is a
simple program which gives (a) the pearson residuals calculated directly,
(b) the pearson residuals from glm, and (c) the deviance residuals from
glm. The first and last
2004 Mar 03
1
Bug in plot.lm (PR#6640)
Dear all,
I noticed the following behaviour of plot.lm:
> fm1 <- lm(time~dist, data=hills, weights=c(0,0,rep(1,33)))
> par(mfrow=c(2,2))
> plot(fm1)
Warning messages:
1: longer object length
is not a multiple of shorter object length in: res/(sd * (1 - hat))
2: longer object length
is not a multiple of shorter object length in: (res/(sd * (1 - hat)))^2 * hat
which seems to be
2018 Jun 03
2
aic() component in GLM-family objects
Is it generally known/has it been previously discussed here that the
$aic() component in GLM-family objects (e.g. results of binomial(),
poisson(), etc.) does not as implemented actually return the AIC, but
rather -2*log-likelihood + 2*(model_has_scale_parameter) ? Can anyone
in this forum gauge how a documentation patch would be received?
This behaviour does not seem to be documented in ?family
2002 Feb 27
1
Bug in glm.fit? (PR#1331)
G'day all,
I had a look at the GLM code of R (1.4.1) and I believe that there are
problems with the function "glm.fit" that may bite in rare
circumstances. Note, I have no data set with which I ran into
trouble. This report is solely based on having a look at the code.
Below I append a listing of the glm.fit function as produced by my
system. I have added line numbers so that I
2006 Apr 23
1
lme: null deviance, deviance due to the random effects, residual deviance
A maybe trivial and stupid question:
In the case of a lm or glm fit, it is quite informative (to me) to have
a look to the null deviance and the residual deviance of a model. This
is generally provided in the print method or the summary, eg:
Null Deviance: 658.8
Residual Deviance: 507.3
and (a bit simpled minded) I like to think that the proportion of
deviance 'explained' by the
2000 May 09
4
Dispersion in summary.glm() with binomial & poisson link
Following p.206 of "Statistical Models in S", I wish to change
the code for summary.glm() so that it estimates the dispersion
for binomial & poisson models when the parameter dispersion is
set to zero. The following changes [insertion of ||dispersion==0
at one point; and !is.null(dispersion) at another] will do the trick:
"summary.glm" <-
function(object, dispersion =
2005 Apr 13
1
logistic regression weights problem
Hi All,
I have a problem with weighted logistic regression. I have a number of
SNPs and a case/control scenario, but not all genotypes are as
"guaranteed" as others, so I am using weights to downsample the
importance of individuals whose genotype has been heavily "inferred".
My data is quite big, but with a dummy example:
> status <- c(1,1,1,0,0)
> SNPs <-
2003 Aug 27
2
Basic GLM: residuals definition
Dear R Users,
I suppose this is a school boy question, but here it is anyway. I'm trying to re-create the residuals for a poisson GLM with simulated data;
x<-rpois(1000,5)
model<-glm(x~1,poisson)
my.resids<-(log(x)- summary(model)$coefficients[1])
plot(my.resids,residuals(model))
This shows that my calculated residuals (my.resids) are not the same as residuals(model).
p 65 of
2004 May 17
1
residuals in multinom
Hi,
is there a possibility to calculate the different "types" of residuals
directly using the multinom function from MASS as it is possible for the
functions gam, glm
using type="deviance" or "working" or "pearson" or "response"? I tried it
but got always the "response" type, I guess.
thanx
Matthias
2004 Feb 24
1
rstandard does not produce standardized residuals
Dear all,
the application of the function rstandard() in the base package
to a glm object does not produce residuals standardized to
have variance one:
the reason is that the deviance residuals are divided
by the dispersion estimate and not by the
square root of the estimate for the dispersion.
Should the function not be changed to produce residuals
with a variance about 1?
R 1.8.1 on
2006 Aug 31
1
NaN when using dffits, stemming from lm.influence call
Hi all
I'm getting a NaN returned on using dffits, as explained
below. To me, there seems no obvious (or non-obvious reason
for that matter) reason why a NaN appears.
Before I start digging further, can anyone see why dffits
might be failing? Is there a problem with the data?
Consider:
# Load data
dep <-
2005 Feb 11
1
cook's distance in weighted regression
I have a puzzle as to how R is computing Cook's distance in weighted linear
regression.
In
this case cook's distance should be given not as in OLS case by
h_ii*r_i^2/(1-hii)^2 divided by k*s^2 (1)
(where r is plain unadjusted residual, k is number of parameters in model,
etc. )
but rather by
w_ii*h_ii*r_i^2/(1-hii)^2 divided by k*s^2,