Displaying 20 results from an estimated 120 matches similar to: "binomial()$linkinv no longer accepts integer values"
2025 Jan 08
1
binomial()$linkinv no longer accepts integer values
On Wed, 8 Jan 2025 10:57:47 -0500
Ben Bolker <bbolker at gmail.com> wrote:
> I haven't done the archaeology to figure out when this broke/exactly
> what change in the R code base broke it: it happened within the last
> month or so
binomial() itself exhibits this property even in R-4.2.2 from more than
two years ago:
R -q -s -e 'getRversion(); binomial()$linkinv(1L)'
2025 Jan 08
1
binomial()$linkinv no longer accepts integer values
Thanks, that makes sense.
I guess if it never worked for integers (or hasn't worked in a long
time, at least) then it doesn't need to be fixed/changed ...
cheers
Ben
On 2025-01-08 11:20 a.m., Ivan Krylov wrote:
> On Wed, 8 Jan 2025 10:57:47 -0500
> Ben Bolker <bbolker at gmail.com> wrote:
>
>> I haven't done the archaeology to figure out when this
2025 Jan 08
1
binomial()$linkinv no longer accepts integer values
On 1/8/25 17:26, Ben Bolker wrote:
> Thanks, that makes sense.
>
> ? I guess if it never worked for integers (or hasn't worked in a long
> time, at least) then it doesn't need to be fixed/changed ...
Still you found out that the type check and use of REAL() in the
function is in wrong order. Instead of
"REAL() can only be applied to a 'numeric', not a
2025 Jan 08
1
binomial()$linkinv no longer accepts integer values
> On 9 Jan 2025, at 05:56, Tomas Kalibera <tomas.kalibera at gmail.com> wrote:
>
>
> On 1/8/25 17:26, Ben Bolker wrote:
>> Thanks, that makes sense.
>>
>> I guess if it never worked for integers (or hasn't worked in a long time, at least) then it doesn't need to be fixed/changed ...
>
> Still you found out that the type check and use of
2008 Jul 17
0
Re : float and double precision with C code
thank you for your quick answer,
I'm far of the digits capacity and my values are not the result of a computation. I'm developping a R package to acces a specific data source. And I need precision a few better. How can I do ?
When I try this In R console, this is correct and what I need :
> my_value <- 29.958334
> my_value == 29.958334
[1] TRUE
But I need to do the first
2008 Jul 17
0
Re : Re : float and double precision with C code
ok, sorry, my mistake was the C printf.
Thank you for your good answer
Regards
----- Message d'origine ----
De : JS Ubei <jsubei at yahoo.fr>
? : jim holtman <jholtman at gmail.com>
Cc : r-help at r-project.org
Envoy? le : Jeudi, 17 Juillet 2008, 15h25mn 07s
Objet : [R] Re : float and double precision with C code
thank you for your quick answer,
I'm far of the digits
2012 Aug 27
3
How to generate a matrix of Beta or Binomial distribution
Hi folks,
I have a question about how to efficiently produce random numbers from Beta
and Binomial distributions.
For Beta distribution, suppose we have two shape vectors shape1 and shape2.
I hope to generate a 10000 x 2 matrix X whose i th rwo is a sample from
reta(2,shape1[i]mshape2[i]). Of course this can be done via loops:
for(i in 1:10000)
{
X[i,]=rbeta(2,shape1[i],shape2[i])
}
However,
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]
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
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:
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
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
2008 Jun 13
1
Writing a new link for a GLM.
Hi,
I wish to write a new link function for a GLM. R's glm routine does
not supply the "loglog" link. I modified the make.link function adding
the code:
}, loglog = {
linkfun <- function(mu) -log(-log(mu))
linkinv <- function(eta) exp(-exp(-eta))
mu.eta <- function(eta) exp(-exp(-eta)-eta)
valideta <- function(eta) all(eta != 0)
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
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
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 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
2007 Jan 26
0
R crash with modified lmer code
Hi all,
I've now got a problem with some modified lmer code (function lmer1
pasted at end) - I've made only three changes to the lmer code (marked),
and I'm not really looking for comments on this function, but would like
to know why execution of the following commands that use it almost
invariably (but not quite predictably) leads to the R session
terminating.
Here's the command
2007 Aug 02
1
simulate() and glm fits
Dear All,
I have been trying to simulate data from a fitted glm using the simulate()
function (version details at the bottom). This works for lm() fits and
even for lmer() fits (in lme4). However, for glm() fits its output does
not make sense to me -- am I missing something or is this a bug?
Consider the following count data, modelled as gaussian, poisson and
binomial responses:
counts
2014 Jan 13
1
predict.glm line 28. Please explain
I imitated predict.glm, my thing worked, now I need to revise. It would
help me very much if someone would explain predict.glm line 28, which says
object$na.action <- NULL # kill this for predict.lm calls
I want to know
1) why does it set the object$na.action to NULL
2) what does the comment after mean?
Maybe I need a pass by value lesson too, because I can't see how changing
that