Displaying 20 results from an estimated 1000 matches similar to: "using identity link for binomial familly with glm"
2009 Jan 23
4
glm binomial loglog (NOT cloglog) link
I would like to do an R glm() with
family = binomial(link="loglog")
Right now, the cloglog link exists, which is nice when the data have a
heavy tail to the left. I have the opposite case and the loglog link
is what I need. Can someone suggest how to add the loglog link onto
glm()? It would be lovely to have it there by default, and it
certainly makes sense to have the two opposite
2004 Jun 01
2
GLMM(..., family=binomial(link="cloglog"))?
I'm having trouble using binomial(link="cloglog") with GLMM in
lme4, Version: 0.5-2, Date: 2004/03/11. The example in the Help file
works fine, even simplified as follows:
fm0 <- GLMM(immun~1, data=guImmun, family=binomial, random=~1|comm)
However, for another application, I need binomial(link="cloglog"),
and this generates an error for me:
>
2013 Nov 20
1
Binomial GLM in Stata and R
Hello,
I'm not a Stata user so I'm trying to reproduce Stata results that are given to me in R. I would like to use a GLM with a complementary log-log function. The stata code I have is:
glm c IndA fia, family(binomial s) link(cloglog) offset(offset)
The R code is:
glmt <- glm(data=dataset, c ~ IndA + fia, offset = offset, family = binomial(link = cloglog))
Which yields
2009 Jul 14
1
2 x 2 x 10 x 2 binomial setup
Hello,
I have a hierarchical dataset of this form and am trying to analyze it in
R.
1 subject
Tested under 2 conditions: A and B
10 sesssions in each condition
In each session, 2 kinds of tests: Test 1 and Test 2
200 independent repetitions of each test-type, with 200 Yes/No answers
So I think this is a 2 x 2 x 10 x 2 setup
What I want to know is whether the difference in percentage of yes
2008 Sep 09
1
binomial(link="inverse")
this may be a better question for r-devel, but ...
Is there a particular reason (and if so, what is it) that
the inverse link is not in the list of allowable link functions
for the binomial family? I initially thought this might
have something to do with the properties of canonical
vs non-canonical link functions, but since other link functions
(probit, cloglog, cauchit, log) are allowed, I
2009 Feb 19
1
modifying legend in scatterplot matrix R
Hello R users,
I have some troubles to modify the "per default" legend in the
scatterplot.matrix using the car package. Here is my code:
--------------------------------------------------------------------
scatterplot.matrix(~ a + b + c,
groups=treatment,
by.groups=F,
data=newfile3,
smooth=T,
pch=c(16,4),
cex=1.3,
2009 Apr 23
0
Problem to get a simple Analysis of Variance table with lmer()
Dear R users,
Is someone know how to get a simple analysis of variance table using other
random distribution than normal (ex: Poisson or Binomial)? When I try, I
recieved this message: (See my R code below)
--------------------- R response ----------------------------
Erreur dans anova(fit.poisson) :
single argument anova for GLMMs not yet implemented
OR
Erreur dans anova(fit.binomial) :
2008 Apr 10
1
Degrees of freedom in binomial glm
Hello,
I am looking at the job satisfaction data below, from a problem in
Agresti's book, and I am not sure where the degrees of freedom come
from. The way I am fitting a binomial model, I have 168 observations,
so in my understanding that should also be the number of fitted
parameters in the saturated model. Since I have one intercept
parameter, I was thinking to get 167 df for the Null
2004 Jul 12
6
proportions confidence intervals
Dear R users
this may be a simple question - but i would appreciate any thoughts
does anyone know how you would get one lower and one upper confidence
interval for a set of data that consists of proportions. i.e. taking a
usual confidence interval for normal data would result in the lower
confidence interval being negative - which is not possible given the data
(which is constrained between
2009 Aug 21
2
using loglog link in VGAM or creating loglog link for GLM
I am trying to figure out how to apply a loglog link to a binomial
model (dichotomous response variable with far more zeros than ones).
I am aware that there are several relevant posts on this list, but I
am afraid I need a little more help. The two suggested approaches
seem to be: 1) modify the make.link function in GLM, or 2) use the
loglog or cloglog functions in the VGAM package.
2006 Mar 16
0
Having trouble with plot.survfit and fun="cloglog"
I'm having trouble getting fun="cloglog" to work with plot on
a survfit object. Here are the data I used for the commands
that follow.
days status
2 0
2 0
5 1
9 0
14 1
16 0
16 0
17 0
29 1
30 0
37 1
37 0
39 1
44 0
44 0
58 0
60 1
67 1
68 1
82 1
82 1
86 0
86 0
89 1
93 0
97 1
100 0
100 0
100 0
> library(survival)
Loading required package: splines
> eg1.km <-
2004 May 29
1
GLMM error in ..1?
I'm trying to use GLMM in library(lme4), R 1.9.0pat, updated just
now. I get an error message I can't decipher:
library(lme4)
set.seed(1)
n <- 10
N <- 1000
DF <- data.frame(yield=rbinom(n, N, .99)/N, nest=1:n)
fit <- GLMM(yield~1, random=~1|nest, family=binomial, data=DF,
weights=rep(N, n))
Error in eval(expr, envir, enclos) : ..1 used in an incorrect
2008 Sep 09
1
Genmod in SAS vs. glm in R
Hello,
I have different results from these two softwares for a simple binomial GLM
problem.
>From Genmod in SAS: LogLikelihood=-4.75, coeff(intercept)=-3.59,
coeff(x)=0.95
>From glm in R: LogLikelihood=-0.94, coeff(intercept)=-3.99, coeff(x)=1.36
Is there anyone tell me what I did wrong?
Here are the code and results,
1) SAS Genmod:
% r: # of failure
% k: size of a risk set
data
2002 Aug 02
1
survival analysis: plot.survfit
Hello everybody,
does anybody know how the function plot.survfit exactly works?
I'd like to plot the log of the cummulative hazard against the
log time by using plot.survfit(...fun="cloglog") which does not
work correctly. The scales are wrong and there is an error
message about infinit numbers. It must have something to do with
the censored data, doesn't it?
#Example:
2006 Jun 13
1
Slight fault in error messages
Just a quick point which may be easy to correct. Whilst typing the
wrong thing into R 2.2.1, I noticed the following error messages,
which seem to have some stray quotation marks and commas in the list
of available families. Perhaps they have been corrected in the latest
version (sorry, I don't want to upgrade yet, but it should be easy to
check)?
> glm(1 ~ 2,
2018 May 20
2
Scale
I would like to get horizontal numbers on the both axes: X and Y.
I got horizontal numbers only on the Y axis when adding las=2,
How to obtain a horizontal orientation for number on scale also for the X axis
(now they are vertical)? Here is my code:
plot(survfit(Y~addicts$clinic), fun="cloglog", las=2)
[[alternative HTML version deleted]]
2009 May 11
1
Warning trying to plot -log(log(survival))
windows xp
R 2.8.1
I am trying to plot the -log(log(survival)) to visually test the proportional hazards assumption of a Cox regression. The plot, which should give two lines (one for each treatment) gives only one line and a warning message. I would appreciate help getting two lines, and an explanation of the warning message. My problem may the that I have very few events in one of my strata,
2007 Jan 06
2
negative binomial family glm R and STATA
Dear Lister,
I am facing a strange problem fitting a GLM of the negative binomial
family. Actually, I tried to estimate theta (the scale parameter)
through glm.nb from MASS and could get convergence only relaxing the
convergence tolerance to 1e-3. With warning messages:
glm1<-glm.nb(nbcas~.,data=zonesdb4,control=glm.control(epsilon = 1e-3))
There were 25 warnings (use warnings() to see
2001 Dec 18
2
Aranda-Ornaz links for binary data
Hi,
I would like apply different link functions from Aranda-Ordaz (1981)
family to large binary dataset (n = 2000). The existing links in glm for
binomial data (logit, probit, cloglog) are not adequate for my data, and I
need to test some other transformations.
Is it possible to do this in R? And how?
Thank you for your help,
/Sharon
2020 Apr 13
0
Poor family objects error messages
Hello,
The following code:
> binomial(identity)
Generates an error message:
Error in binomial(identity) :
link "identity" not available for binomial family; available links are ?logit?, ?probit?, ?cloglog?, ?cauchit?, ?log?
While :
> binomial("identity")
Yields an identity-binomial object that works as expected with stats::glm
The error in the first example mislead