Displaying 20 results from an estimated 3000 matches similar to: "make error in R devel"
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:
2004 Jul 13
2
confint.glm in a function
I can't get confint.glm to work from within a function. Consider
the following (using R 1.9.1, Windows 2000):
# FIRST: SOMETHING THAT WORKS FROM A COMMAND PROMPT
DF <- data.frame(y=.1, N=100)
(fit <- glm(y~1, family=binomial, data=DF,
weights=DF[,"N"]))
Call: glm(formula = y ~ 1, family = binomial, data = DF, weights =
DF[, "N"])
Coefficients:
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
2008 Jan 07
1
xtable (PR#10553)
Full_Name: Soren Feodor Nielsen
Version: 2.5.0
OS: linux-gnu
Submission from: (NULL) (130.225.103.21)
The print-out of xtable in the following example is wrong; instead of yielding
the correct ci's for the second model it repeats the ci's from the first model.
require(xtable)
require(MASS)
data(cats)
b1<-lm(Hwt~Sex,cats)
b2<-lm(Hwt~Sex+Bwt,cats)
2018 Jul 20
3
Should there be a confint.mlm ?
It seems that confint.default returns an empty data.frame for objects of
class mlm. For example:
```
nobs <- 20
set.seed(1234)
# some fake data
datf <-
data.frame(x1=rnorm(nobs),x2=runif(nobs),y1=rnorm(nobs),y2=rnorm(nobs))
fitm <- lm(cbind(y1,y2) ~ x1 + x2,data=datf)
confint(fitm)
# returns:
2.5 % 97.5 %
```
I have seen proposed workarounds on stackoverflow and elsewhere, but
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)
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 +
2003 Nov 17
1
confint: which method attached?
the function
confint
uses the profiling method of the function of the package MASS
confint.glm
even after the package has been detached!
1: might this be the intenden behavior?
2. How does the function remember its 'MASS' functionality after detaching the package?
R: 1.8.0; Windows 2000
Here is a sample program
> set.seed(7882)
> x<-rep(c(0,1),c(20,20))
>
2019 Apr 24
1
Bug in "stats4" package - "confint" method
Dear R developers,
I noticed a bug in the stats4 package, specifically in the confint method applied to ?mle? objects.
In particular, when some ?fixed? parameters define the log likelihood, these parameters are stored within the mle object but they are not used by the ?confint" method, which retrieves their value from the global environment (whenever they still exist).
Sample code:
>
2011 Aug 02
1
How to 'mute' a function (like confint())
Dear R-helpers,
I am using confint() within a function, and I want to turn off the message
it prints:
x <- rnorm(100)
y <- x^1.1+rnorm(100)
nlsfit <- nls(y ~ g0*x^g1, start=list(g0=1,g1=1))
> confint(nlsfit)
Waiting for profiling to be done...
2.5% 97.5%
g0 0.4484198 1.143761
g1 1.0380479 2.370057
I cannot find any way to turn off 'Waiting for. .."
I tried
2012 Jan 18
4
confint function in MASS package for logistic regression analysis
I have the following binary data set:
Sex
Response 0 1
0 159 162
1 4 37
My commands
library(MASS)
sib.glm=glm(sib~sex,family=binomial,data=sib.data)
summary(sib.glm)
The coefficients in the output are
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.6826 0.5062 -7.274 3.48e-13
2011 May 06
2
Confidence intervals and polynomial fits
Hi all! I'm getting a model fit from glm() (a binary logistic regression fit, but I don't think that's important) for a formula that contains powers of the explanatory variable up to fourth. So the fit looks something like this (typing into mail; the actual fit code is complicated because it involves step-down and so forth):
x_sq <- x * x
x_cb <- x * x * x
x_qt <- x * x * x
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
this moment I don't understand
2007 Dec 05
1
confint for coefficients from lm model (PR#10496)
Full_Name: Christian Lajaunie
Version: 2.5.1
OS: Fedora fc6
Submission from: (NULL) (193.251.63.39)
confint() does not use the appropriate variance term when the design
matrix contains a zero column (which of course should not happen).
Example:
A 10x2 matrix with trivial column 1:
> junk <- data.frame(x=rep(0,10), u=factor(sample(c("Y", "N"), 10, replace=T)))
The
2006 Dec 13
1
Curious finding in MASS:::confint.glm() tied to eval()
Greetings all,
I was in the process of creating a function to generate profile
likelihood confidence intervals for a proportion using a binomial glm.
This is a component of a larger function to generate and plot confidence
intervals for proportions using the above, along with bootstrap (BCa),
Wilson and Exact to visually demonstrate the variation across the
methods to some folks.
I had initially
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
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 Dec 07
5
confint for glm (general linear model)
Hi,
I have a glm gives summary as follows,
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.03693352 1.449574526 -1.405194 0.159963578
A 0.01093048 0.006446256 1.695633 0.089955471
N 0.41060119 0.224860819 1.826024 0.067846690
S -0.20651005 0.067698863 -3.050421 0.002285206
then I use confint(k.glm)
2011 Feb 11
2
Problem with confint function
Hi,
I am currently doing logistic regression analyses and I am trying to get
confidence intervals for my partial logistic regression coefficients.
Supposing I am right in assuming that the formula to estimate a 95% CI for a
log odds coefficient is the following:
log odds - 1.96*SE to log odds + 1.96*SE
then I am not getting the right CI.
For instance, this is a summary of my model:
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: