Displaying 20 results from an estimated 28 matches for "d93".
Did you mean:
d9
2005 Feb 02
1
anova.glm (PR#7624)
...n publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for a HTML browser interface to help.
Type 'q()' to quit R.
> 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 + treatment, family=poisson())
> anova(glm.D93,test="Chisq")
Analysis of Deviance Table
Model: poisson, link: log
Response: counts
Terms added sequentially (first to last)
Df Deviance Resid. Df Resid. Dev P(>|Chi|)
NULL...
2006 Oct 24
1
Cook's Distance in GLM (PR#9316)
...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)
treatment <- gl(3,3)
d.AD <- data.frame(treatment, outcome, counts)
glm.D93 <- glm(counts ~ outcome + treatment, family=poisson())
opar <- par(mfrow=c(2,1))
plot(glm.D93, which=c(4,5))
par(opar)
cooks.distance(glm.D93)
The difference is reasonably moderate in this case. My suspicions
were aroused by a case in which the plot showed five or size points
greater than...
2004 Mar 23
1
influence.measures, cooks.distance, and glm
...istance 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 + treatment, family=poisson())
> influence.measures(glm.D93)$infmat[, 8]
1 2 3 4 5 6
0.288294276 0.309131723 0.011614584 0.030963844 0.304525117 0.444410274
7 8 9
0.459190432 0...
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
2006 May 08
0
Inconsistency in AIC values for glm with family poisson (PR#8841)
...t; inconsistent AIC value. We also get the same wrong value if we use
> "extractAIC" o "AIC" functions.
Inconsistent with what? It seems to me that it consistently gives the
right answer, but you have not used the actual definition of AIC.
> example(glm)
>
> glm.D93
>
> extractAIC(glm.D93)
>
> #AIC of this model should be 15.129 (residual deviance + 2*effective
> degrees of freedom), but the AIC which R returns is 56.76. Function
> extractAIC returns the right number of effective degrees of freedom (5),
> but anyway seems to fail in cal...
2013 May 29
1
quick question about glm() example
I don't have a copy of Dobson (1990) from which the glm.D93 example is
taken in example("glm"), but I'm strongly suspecting that these are
made-up data rather than real data; the means of the responses within
each treatment are _identical_ (equal to 16 2/3), so two of the
parameters are estimated as being zero (within machine tolerance). (At...
2005 Oct 15
2
how to import such data to R?
.... .
. . . -1 . "arizona state"
. 0 .
------snip-----
the data descriptions is:
variable names:
year apps top25 ver500 mth500 stufac bowl btitle
finfour lapps d93 avg500 cfinfour clapps cstufac cbowl
cavg500 cbtitle lapps_1 school ctop25 bball cbball
Obs: 118
1. year 1992 or 1993
2. apps # applics for admission
3. top25 perc frosh class in 25th high...
2009 Aug 19
3
Sweave output from print.summary.glm is too wide
...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) # This is where the problem is evident
@
\end{document}
The intent of the options(width=40) command is to ensure the output does not extend to far to the right of the page, as per the Sweave manual Section A.14. And in most cases, this does the job.
Now, I run Sweave on the above file, ru...
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
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:
2013 Feb 18
1
nobs() with glm(family="poisson")
...and not the number of
> cells (Raftery, 1986a).
Is there a reason why this should not/cannot be done that way?
This behavior can be reproduced with with R 3.0.0 from SVN, using the
example from ?glm:
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 + treatment, family = poisson())
nobs(glm.D93)
# 9 == length(counts)
# Should be 150 == sum(counts)
FWIW, stats:::nobs.glm is currently defined as:
nobs.glm <- function (object, ...)
if (!is.null(w <- object$prior.weights)) sum(w != 0) else length(object$resid...
2000 May 09
4
Dispersion in summary.glm() with binomial & poisson link
...ect$residuals^2)/ df.r
} else Inf
## calculate scaled and unscaled covariance matrix
......
Here is an example:
> counts <- c(18,17,15,20,10,20,25,13,12)
> outcome <- gl(3,1,9)
> treatment <- gl(3,3)
> print(d.AD <- data.frame(treatment, outcome, counts))
> glm.D93 <- glm(counts ~ outcome + treatment, family=poisson())
> anova(glm.D93)
> summary(glm.D93,dispersion=0) #current code
......
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.045e+00 0.000e+00 Inf <2e-16
outcome2 -4.543e-01 0.000e+00 -Inf...
2005 Apr 06
2
make error in R devel
...t 0.380088737 1.622517536
am -0.614677730 0.926307310
> confint(fit, "wt")
2.5 % 97.5 %
wt 0.3800887 1.622518
>
> ## from example(glm)
> 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 + treatment, family=poisson())
> confint(glm.D93)
Error in loadNamespace(name) : there is no package called 'MASS'
Execution halted
But as there are no recommended packages this fails as indicated. So is
there something wrong with what I'm doing (i.e. so...
2005 Jul 27
1
Question on glm for Poisson distribution.
Good afternoon,
I REALLY try to answer to my question as an autonomous student searching in
the huge pile of papers on my desk and on the Internet but I can't find out
the solution.
Would you mind giving me some help? Please.
#########################################
I'm trying to use glm with factors:
> Pyr.1.glm<-glm(Pyrale~Trait,DataRav,family=poisson)
If I have correctly
2012 Jan 12
1
posting for r-help
...l mean and confidence intervals for a
particular independent variable?
For example in the following example:
>> counts <- c(18,17,15,20,10,20,25,13,12)
>> outcome <- gl(3,1,9)
>> treatment <- gl(3,3)
>> d.AD <- data.frame(treatment, outcome, counts)
>> glm.D93 <- glm(counts ~ outcome + treatment, family=poisson,
>> data=d.AD)
How would one calculate the confidence intervals for the "treatment" variable?
Is there something that can come after the 'se.fit=TRUE' command?
Thanks very much!
Rachel
Rachel T. Buxton
P...
2009 Aug 20
0
Sweave truncation
...This combination of strwrap and writeLines
>seems to "work" in one sense of the word:
>
>
>
># Intro stuff:
>wid <- 50
>option(width=wid)
>hide <- capture.output(example(glm))
>
># The business end:
>writeLines( strwrap( capture.output(summary(glm.D93)), wid))
>
>
>
>Mind you, while it "works", it's an awful construct. I was actually
>hoping to show this code in my book:
> summary(glm.D93)
>and get the nice output appearing in my book. I don't plan on replacing
>the simple code above with
>...
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
2009 Jan 20
1
Poisson GLM
This is a basics beginner question.
I attempted fitting a a Poisson GLM to data that is non-integer ( I believe
Poisson is suitable in this case, because it is modelling counts of
infections, but the data collected are all non-negative numbers with 2
decimal places).
My question is, since R doesn't return an error with this glm fitting, is it
important that the data is non-integer. How does
2008 May 26
1
Sweave does not respect width
...adapted from the GLM example):
\documentclass{article}
\begin{document}
<<setup,include=FALSE,echo=FALSE>>=
options(width=80)
@
<<test>>=
countsasdfasdfasdf <- c(18,17,15,20,10,20,25,13,12)
outcomeasdfasdfasdf <- gl(3,1,9)
treatmentasdfasdfasdfasdf <- gl(3,3)
glm.D93 <- glm(countsasdfasdfasdf ~ outcomeasdfasdfasdf +
treatmentasdfasdfasdfasdf, family=poisson())
@
\end{document}
When I compile this, treatmentasdfasdfasdfasdf sticks out into the right
margin. The linebreak is inserted after the last comma, so that the line as
printed is 85 characters long, ev...
2011 Sep 19
1
"could not find function" after import
I am trying to build a package (GWASTools, submitted to Bioconductor)
that uses the "sandwich" package. I have references to "sandwich" in
DESCRIPTION:
Imports: methods, DBI, RSQLite, sandwich, survival, DNAcopy
and NAMESPACE:
import(sandwich)
In the code itself is a call to vcovHC:
Vhat <- vcovHC(mod, type="HC0")
I have sandwich version 2.2-7 installed.