similar to: New Family object for GLM models...

Displaying 20 results from an estimated 300 matches similar to: "New Family object for GLM models..."

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
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 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
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
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 Jan 14
2
initialize expression in 'quasi' (PR#8486)
This is not so much a bug as an infelicity in the code that can easily be fixed. The initialize expression in the quasi family function is, (uniformly for all links and all variance functions): initialize <- expression({ n <- rep.int(1, nobs) mustart <- y + 0.1 * (y == 0) }) This is inappropriate (and often fails) for variance function "mu(1-mu)".
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
2019 Apr 26
1
Error in glm(..., family=quasi(..., variance=list(...)))
In a glm() call using a quasi() family, one may define a custom variance function in the form of a "list containing components varfun, validmu, dev.resids, initialize and name" (quoting the help page for family). In trying to do so, I run into the following issue that I have not seen discussed previously: x <- runif(1000, min=0, max=1) y <- x + rnorm(1000, mean=0, sd=1)*x^(3/4)
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.
2012 Mar 14
1
Glm and user defined variance functions
Hi, I am trying to run a generalized linear regression using a negative binomial error distribution. However, I want to use an overdispersion parameter that varies (dependent on the length of a stretch of road) so glm.nb will not do. >From what I've read I should be able to do this using GLM by specifying my own quasi family and describing the variance function using varfun, validmu,
2005 Jun 02
1
glm with variance = mu+theta*mu^2?
How might you fit a generalized linear model (glm) with variance = mu+theta*mu^2 (where mu = mean of the exponential family random variable and theta is a parameter to be estimated)? This appears in Table 2.7 of Fahrmeir and Tutz (2001) Multivariate Statisticial Modeling Based on Generalized Linear Models, 2nd ed. (Springer, p. 60), where they compare "log-linear model fits to
2011 Apr 19
1
How to Extract Information from SIMEX Output
Below is a SIMEX object that was generated with the "simex" function from the "simex" package applied to a logistic regression fit. From this mountain of information I would like to extract all of the values summarized in this line: .. ..$ variance.jackknife: num [1:5, 1:4] 1.684 1.144 0.85 0.624 0.519 ... Can someone suggest how to go about doing this? I can extract the
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
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)
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]
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