Displaying 20 results from an estimated 700 matches similar to: "Writing a new link for a GLM."
2008 Apr 03
1
help with R semantics
Greetings:
I'm running R2.6.2 on a WinXP DELL box with 2 gig RAM.
I have created a new glm link function to be used with family = binomial.
The function works (although any suggested improvements would be welcome),
logit.FC <- function(POD.floor = 0, POD.ceiling =1)
{ if (POD.floor < 0 | POD.floor > 1) stop ("POD.floor must be between zero
and one.")
if
2008 May 20
1
"NOTE" warning
Dear all
I am using NAMESPACE in my package but I would like the user to be able
to overwrite four functions:
own.linkfun, own.linkinv, own.mu.eta and own.valideta.
These are used to defined "own" link functions.
Is there any way of doing that without getting the when I am checking
the package?
This is what I am getting:
make.link.gamlss : linkfun: no visible binding for global
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
2007 Feb 10
2
error using user-defined link function with mixed models (LMER)
Greetings, everyone. I've been trying to analyze bird nest survival
data using generalized linear mixed models (because we documented
several consecutive nesting attempts by the same individuals; i.e.
repeated measures data) and have been unable to persuade the various
GLMM models to work with my user-defined link function. Actually,
glmmPQL seems to work, but as I want to evaluate a suite of
2005 Jun 16
1
mu^2(1-mu)^2 variance function for GLM
Dear list,
I'm trying to mimic the analysis of Wedderburn (1974) as cited by
McCullagh and Nelder (1989) on p.328-332. This is the leaf-blotch on
barley example, and the data is available in the `faraway' package.
Wedderburn suggested using the variance function mu^2(1-mu)^2. This
variance function isn't readily available in R's `quasi' family object,
but it seems to me
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 Jul 30
1
Parametric links for glm?
At useR 2006 I mentioned that it would be nice to have a way to
specify binomial links
that involved free parameters and described some experience with a
Gosset link involving
a free degrees of freedom parameter, and a Tukey-lambda link with two
free parameters.
My implementation of this involved some rather kludgey modifications
of binomial,
make.link and glm that (essentially) added a
2005 Apr 14
0
predict.glm(..., type="response") dropping names (and a propsed (PR#7792)
Here's a patch that should make predict.glm(..., type="response") retain the
names. The change passes make check on our Opteron running SLES9. One
simple test is:
names(predict(glm(y ~ x, family=binomial,
data=data.frame(y=c(1, 0, 1, 0), x=c(1, 1, 0, 0))),
newdata=data.frame(x=c(0, 0.5, 1)), type="response"))
which gives
[1]
2005 Aug 12
1
Help converting a function from S-Plus to R: family$weight
Hi all
I am converting an S-Plus function into R. The S-Plus code
uses some of the glm families, and family objects.
The family objects in S-Plus and R have many different
features, for example:
In R:
> names(Gamma())
[1] "family" "link" "linkfun" "linkinv" "variance"
[6] "dev.resids" "aic"
2012 Aug 10
0
error applying user-defined link function to lmer
Dear R users,
I'm struggling with applying a user-defined link function in lmer. For analyzing data of a 2AFC psychophysical experiment, I would like to model my binary data with a logistic function with a lower limit at 0.5 instead of 0. In a previous question this has been described as a halflogit function. To do so I wrote my own link function and would like to submit it to lmer, however
2013 Sep 13
1
log-log link function
Hi to every body. I would like assistance on how to implement the log-log
link function for binary response. Is there any package that implements it?
Many thanks
Endy
[[alternative HTML version deleted]]
2009 Jul 21
0
Custom Link/Family for lmer
Hello List,
I am modeling a binomial response (nest survival) and I want to incorporate
a random effect, in this case site. I had previously been using glm with a
custom link function, but my understanding is that lmer does not currently
allow a custom link. Therefore, I was investigating if other procedures for
mixed models will allow a custom link function. here is the custom link
function:
2010 Mar 26
1
Linear mixed models with custom link functions in R
Hello All,
I am looking for an R library/function that allows the specification
of a custom link function in a linear mixed model. I've been using
glm() in library MASS to fit fixed-effect models with a custom link but
my study design demands mixed models. Any suggestions on the best R
library/function to achieve this would be greatly appreciated. I have
tried, to no avail, to
2005 Jun 14
1
New Family object for GLM models...
Dear R-Users,
I wish to create a new family object based on the Binomial family. The only difference will be with the link function. Thus instead if using the 'logit(u)' link function, i plan to use '-log(i-u)'.
So far, i have tried to write the function following that of the Binomial and Negative Binomial families.
The major problem i have here is with the definition of the
2015 Dec 30
1
typo in src/library/stats/man/family.Rd: names of 'validmu' and 'valideta' ??
under "Details" (version 2015-11-29 r69717; not quite cutting-edge,
but nothing has changed in src/library/stats/man/family.Rd in 5 months
[sorry for using the Github mirror, but I prefer the interface ...
<https://github.com/wch/r-source/blob/trunk/src/library/stats/man/family.Rd>])
it says:
valid.mu: logical function. Returns ?TRUE? if a mean vector ?mu? is
within the
2006 Apr 16
3
second try; writing user-defined GLM link function
I apologize for my earlier posting that, unbeknownst to me before,
apparently was not in the correct format for this list. Hopefully this
attempt will go through, and no-one will hold the newbie mistake
against me.
I could really use some help in writing a new glm link function in
order to run an analysis of daily nest survival rates. I've struggled
with this for weeks now, and can at least
2007 Aug 10
0
half-logit and glm (again)
I know this has been dealt with before on this list, but the previous
messages lacked detail, and I haven't figured it out yet.
The model is:
\x_{ij} = \mu + \alpha_i + \beta_j
\alpha is a random effect (subjects), and \beta is a fixed effect
(condition).
I have a link function:
p_{ij} = .5 + .5( 1 / (1 + exp{ -x_{ij} } ) )
Which is simply a logistic transformed to be between .5 and 1.
2003 Jan 16
3
Overdispersed poisson - negative observation
Dear R users
I have been looking for functions that can deal with overdispersed poisson
models. Some (one) of the observations are negative. According to actuarial
literature (England & Verall, Stochastic Claims Reserving in General
Insurance , Institute of Actiuaries 2002) this can be handled through the
use of quasi likelihoods instead of normal likelihoods. The presence of
negatives is not
2006 Mar 08
0
New package for calibration of biplot axes.
Hi,
I recently uploaded a package called "calibrate" to CRAN. This
package contains routines for the calibration of (oblique) axes
in biplots and scatter plots. Documentation provides examples
for ordinary scatter plots with additional axes, biplots from
principal component analysis, correspondence analysis,
canonical correlation analysis and redundancy analysis.
Jan Graffelman
--
2008 Apr 21
0
Upload HardyWeinberg package (1.1)
Hi all,
I've uploaded to CRAN a new version of the HardyWeinberg package. This
package has routines for performing graphical significance tests (based
on the ternary plot) for Hardy-Weinberg equilibrium of bi-allelic marker
data.
Jan.
--
------------------------------------------------------------------------
|Jan Graffelman |tel: +34-93-4011739 |