Displaying 20 results from an estimated 1000 matches similar to: "quick question about glm() example"
2005 Feb 02
1
anova.glm (PR#7624)
There may be a bug in the anova.glm function.
deathstar[32] R
R : Copyright 2004, The R Foundation for Statistical Computing
Version 2.0.1 (2004-11-15), ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project
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 +
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 =
2006 Oct 24
1
Cook's Distance in GLM (PR#9316)
Hi Community,
I'm trying to reconcile Cook's Distances computed in glm. The
following snippet of code shows that the Cook's Distances contours on
the plot of Residuals v Leverage do not seem to be the same as the
values produced by cooks.distance() or in the Cook's Distance against
observation number plot.
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
2013 Feb 18
1
nobs() with glm(family="poisson")
Hi!
The nobs() method for glm objects always returns the number of cases
with non-null weights in the data, which does not correspond to the
number of observations for Poisson regression/log-linear models, i.e.
when family="poisson" or family="quasipoisson".
This sounds dangerous since nobs() is, as the documentation states,
primarily aimed at computing the Bayesian
2006 Jan 29
1
extracting 'Z' value from a glm result
Hello R users
I like to extract z values for x1 and x2. I know how to extract coefficents
using model$coef
but I don't know how to extract z values for each of independent variable. I
looked around
using names(model) but I couldn't find how to extract z values.
Any help would be appreciated.
Thanks
TM
#########################################################
>summary(model)
Call:
2012 Jan 12
1
posting for r-help
Hi there
I have a post I would like to put on the "95% confidence intercal with glm"
thread. Thank-you so much!
I am wondering first of all if anyone knows how to calculate confidence
intervals for a GLMM? I use the lme4 library.
Also, I am wondering how to predict a model mean and confidence intervals for a
particular independent variable?
For example in the following example:
2005 Apr 06
2
make error in R devel
Dear list,
I just hit an error that stopped my make && make check-devel operation
on my linux box (FC3, i686 P4 2GB RAM). Just to note that I've been
building the development branch(?) for some time and this is the first
hint of a problem.
1) updated the src tree using svn update
2) ran ../configure --with-recommended-package=no from my build directory
3) got:
R is now configured
2008 May 26
1
Sweave does not respect width
Hello,
I'm learning to use Sweave, and I've run into a problem: sometimes, when
entering long lines of input and using long variable names, Sweave will not
insert linebreaks in a way that respects the width setting. This causes
undesirable overflows into the margins in the latex file. For example,
consider the following document (adapted from the GLM example):
\documentclass{article}
2005 Oct 15
2
how to import such data to R?
the data file has such structure:
1992 6245 49 . . 20 1
0 0 8.739536 0 . . .
. . . . . "alabama"
. 0 .
1993 7677 58 . . 15 1
0 0
2012 Apr 09
2
Overall model significance for poisson GLM
Greetings,
I am running glm models for species counts using a poisson link function.
Normal summary functions for this provide summary statistics in the form of
the deviance, AIC, and p-values for individual predictors. I would like to
obtain the p-value for the overall model. So far, I have been using an
analysis of deviance table to check a model against the null model with the
intercept as
2009 Aug 19
3
Sweave output from print.summary.glm is too wide
Hi all
I am preparing a document using Sweave; a really useful tool. But I am having a problem.
Consider this toy example Sweave file:
\documentclass{article}
\begin{document}
<<echo=TRUE,results=verbatim>>=
options(width=40) # Set width to 40 characters
hide <- capture.output(example(glm)) # Create an example of the problem, but hide the output
summary(glm.D93) #
2008 Mar 27
1
dreaded p-val for d^2 of a glm / gam
OK,
I really dread to ask that .... much more that I know some discussion about p-values and if they are relevant for regressions were already on the list. I know to get p-val of regression coefficients - this is not a problem. But unfortunately one editor of a journal where i would like to publish some results insists in giving p-values for the squared deviance i get out from different glm and
2002 Mar 29
1
help with lme function
Hi all,
I have some difficulties with the lme function and so this is my problem.
Supoose i have the following model
y_(ijk)=beta_j + e_i + epsilon_(ijk)
where beta_j are fixed effects, e_i is a random effect and
epsilon_(ijk) is the error.
If i want to estimate a such model, i execute
>lme(y~vec.J , random~1 |vec .I )
where y is the vector of my data, vec.J is a factor object
2006 May 08
0
Inconsistency in AIC values for glm with family poisson (PR#8841)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--27464147-1557463723-1147085467=:8118
Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8BIT
On Mon, 8 May 2006, x.sole at iconcologia.net wrote:
> Full_Name: Xavier Sol?
> Version: 2.3.0
> OS: Windows
2006 Mar 01
2
inconsistency between anova() and summary() of glmmPQL
Dear All,
Could anyone explain me how it is possible that one factor
in a glmmPQL model is non-significant according to the
anova() function, whereas it turns out to be significant
(or at least some of its levels differ significantly from
some other levels) according to the summary() function.
What is the truth, which results shall I believe? And, is
there any other way of testing for the
2009 Feb 16
1
Overdispersion with binomial distribution
I am attempting to run a glm with a binomial model to analyze proportion
data.
I have been following Crawley's book closely and am wondering if there is
an accepted standard for how much is too much overdispersion? (e.g. change
in AIC has an accepted standard of 2).
In the example, he fits several models, binomial and quasibinomial and then
accepts the quasibinomial.
The output for residual
2011 Feb 08
1
Error in example Glm rms package
Hi all!
I've got this error while running
example(Glm)
library("rms")
> example(Glm)
Glm> ## Dobson (1990) Page 93: Randomized Controlled Trial :
Glm> counts <- c(18,17,15,20,10,20,25,13,12)
Glm> outcome <- gl(3,1,9)
Glm> treatment <- gl(3,3)
Glm> f <- glm(counts ~ outcome + treatment, family=poisson())
Glm> f
Call: glm(formula = counts ~
2009 Nov 29
1
optim or nlminb for minimization, which to believe?
I have constructed the function mml2 (below) based on the likelihood function described in the minimal latex I have pasted below for anyone who wants to look at it. This function finds parameter estimates for a basic Rasch (IRT) model. Using the function without the gradient, using either nlminb or optim returns the correct parameter estimates and, in the case of optim, the correct standard
2003 Jul 10
1
The question is on Symmetry model for square table.
Please help,
I tried a program on S-plus, and it worked. Also I tried the same
program on R but not worked. Here is the programme. I put it in a
function form. The model and assumption are at the bottom.
where
counts<-c(22,2,2,0,5,7,14,0,0,2,36,0,0,1,17,10)
which is name.data, i is row size and j is the column size.
symmetry
function(i, j, name.data)
{
row <- (c(1:i))
col <-