search for: valideta

Displaying 20 results from an estimated 23 matches for "valideta".

2008 Apr 03
1
help with R semantics
...lt;- qlogis( (mu - POD.floor)/(POD.ceiling - POD.floor) ) } linkinv <- function(eta) { eta <- POD.floor + (POD.ceiling - POD.floor)*plogis(eta) } mu.eta <- function(eta) { (POD.ceiling - POD.floor)*dlogis(eta)# derivitaive of mu with respect to eta } valideta <- function(eta) TRUE link <- paste("logit.FC(", POD.floor, ",", POD.ceiling, ")", sep = "") structure(list(linkfun = linkfun, linkinv = linkinv, mu.eta = mu.eta, valideta = valideta, name = link), class = "link-glm") } as...
2015 Dec 30
1
typo in src/library/stats/man/family.Rd: names of 'validmu' and 'valideta' ??
...: logical function. Returns ?TRUE? if a mean vector ?mu? is within the domain of ?variance?. valid.eta: logical function. Returns ?TRUE? if a linear predictor ?eta? is within the domain of ?linkinv?. However, the real names of these elements are "validmu" and "valideta" (no dots); try names(poisson()) or names(binomial()) and see ... Can someone on R-core fix this and save me the trouble of filing a bug report ... ? Or have I misunderstood something? cheers Ben Bolker
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 variable 'own.linkfun' make.link.gamlss : linkinv: no visi...
2002 Feb 27
1
Bug in glm.fit? (PR#1331)
...;- family$variance 22 dev.resids <- family$dev.resids 23 aic <- family$aic 24 linkinv <- family$linkinv 25 mu.eta <- family$mu.eta 26 if (!is.function(variance) || !is.function(linkinv)) 27 stop("illegal `family' argument") 28 valideta <- family$valideta 29 if (is.null(valideta)) 30 valideta <- function(eta) TRUE 31 validmu <- family$validmu 32 if (is.null(validmu)) 33 validmu <- function(mu) TRUE 34 if (is.null(mustart)) { 35 eval(family$initialize) 36 }...
2008 Jun 13
1
Writing a new link for a GLM.
...;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) }, stop(sQuote(link), " link not recognised")) structure(list(linkfun = linkfun, linkinv = linkinv, mu.eta = mu.eta, valideta = valideta, name = link), class = "link-glm") } and then call glm with argument glm(y~x1+x2+x3,fa...
2007 Feb 10
2
error using user-defined link function with mixed models (LMER)
...the link function I use: logexp <- function(days = 1) { linkfun <- function(mu) qlogis(mu^(1/days)) linkinv <- function(eta) plogis(eta)^days mu.eta <- function(eta) days*.Call("logit_mu_eta", eta, PACKAGE = "stats")*plogis(eta)^(days-1) valideta <- function(eta) TRUE link <- paste("logexp(", days, ")", sep="") structure(list(linkfun = linkfun, linkinv = linkinv, mu.eta = mu.eta, valideta = valideta, name = link), class = "link-glm") } # Modified binomial family function...
2012 Aug 10
0
error applying user-defined link function to lmer
...eta/2)+exp(-eta/2))^-2 half.logit.inv.indicator=function(eta) TRUE half.logit.indicator=function(mu) mu>.5 & mu<1 link <- "half.logit" structure(list(linkfun = half.logit, linkinv = half.logit.inv, ??????????????????? mu.eta = half.logit.deriv, validmu = half.logit.indicator ,valideta = half.logit.inv.indicator, name = link), ?????????????? class = "link-glm") } # submit halflogit function to lmer rcNrPSrcNxPSxP<-lmer(Correct~-1+cNoise*f_Pos+f_Shape_con+f_Shape_con:f_Pos+(-1+cNoise*f_Pos|f_Subject), data=dens_data, family=binomial(halflogit())) #resulting error mes...
2009 Jul 21
0
Custom Link/Family for lmer
...s the custom link function: logexp <- function(days = 1) { linkfun <- function(mu) qlogis(mu^(1/days)) linkinv <- function(eta) plogis(eta)^days mu.eta <- function(eta) days * plogis(eta)^(days-1) * .Call("logit_mu_eta", eta, PACKAGE = "stats") valideta <- function(eta) TRUE link <- paste("logexp(", days, ")", sep="") structure(list(linkfun = linkfun, linkinv = linkinv, mu.eta = mu.eta, valideta = valideta, name = link), class = "link-glm") } Thanks in advance...
2010 Mar 26
1
Linear mixed models with custom link functions in R
...##Custom link function from Shaffer (2004) Auk 121:526-540. { linkfun <- function(mu) qlogis(mu^(1/days)) linkinv <- function(eta) plogis(eta)^days mu.eta <- function(eta) days * plogis(eta)^(days-1) * .Call("logit_mu_eta", eta, PACKAGE = "stats") valideta <- function(eta) TRUE link <- paste("logexp(", days, ")", sep="") structure(list(linkfun = linkfun, linkinv = linkinv, mu.eta = mu.eta, valideta = valideta, name = link), class = "link-glm") } model0 <- glm(s...
2005 Apr 14
0
predict.glm(..., type="response") dropping names (and a propsed (PR#7792)
...- pmax(.Machine$double.eps, eta^(1/lambda)) + pmax(eta^(1/lambda), .Machine$double.eps) mu.eta <- function(eta) - pmax(.Machine$double.eps, (1/lambda) * eta^(1/lambda - 1)) + pmax((1/lambda) * eta^(1/lambda - 1), .Machine$double.eps) valideta <- function(eta) all(eta>0) } else @@ -36,7 +36,7 @@ linkfun <- function(mu) log(mu/(1 - mu)) linkinv <- function(eta) { thresh <- -log(.Machine$double.eps) - eta <- pmin(thresh, pmax(e...
2005 Jun 16
1
mu^2(1-mu)^2 variance function for GLM
...function(y, n, mu, wt, dev) NA structure(list(family = "quasi", link = linktemp, linkfun = stats$linkfun, linkinv = stats$linkinv, variance = variance, dev.resids = dev.resids, aic = aic, mu.eta = stats$mu.eta, initialize = initialize, validmu = validmu, valideta = stats$valideta, varfun = variancetemp), class = "family") }
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 Aug 10
0
half-logit and glm (again)
...ta/2)+exp(-eta/2))^-2 half.logit.inv.indicator=function(eta) TRUE half.logit.indicator=function(mu) mu>.5 & mu<1 link <- "half.logit" structure(list(linkfun = half.logit, linkinv = half.logit.inv, mu.eta = half.logit.deriv, validmu = half.logit.indicator ,valideta = half.logit.inv.indicator, name = link), class = "link-glm") } binomial(halflogit()) Family: binomial Link function: half.logit ############################# I based this off the help for the family() function. So I try to call glmmPQL (based on other R-help posts, thi...
2006 Jul 30
1
Parametric links for glm?
...un <- function(mu) qt(mu,nu) linkinv <- function(eta) { thresh <- -qqt(.Machine$double.eps,nu) eta <- pmin(thresh, pmax(eta, -thresh)) pt(eta,nu) } mu.eta <- function(eta) pmax(dt(eta,nu), .Machine$double.eps) valideta <- function(eta) TRUE }, Just prior to the useR meeting, there were some changes in R-devel to binomial that allow one to pass an object of class "link-glm" -- if I understand properly, this allows one to more easily roll one's own links, but it leaves the question of passing...
2005 Aug 12
1
Help converting a function from S-Plus to R: family$weight
...features, for example: In R: > names(Gamma()) [1] "family" "link" "linkfun" "linkinv" "variance" [6] "dev.resids" "aic" "mu.eta" "initialize" "validmu" [11] "valideta" In S-Plus: > names(Gamma()) [1] "family" "names" "link" "inverse" "deriv" [6] "initialize" "variance" "deviance" "weight" > My question concerns the variable weight in...
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 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
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]]
2010 Oct 19
2
Strange glm(, quasipoisson) error
Dear list, I have recently encountered an odd error when running glm(dep~indep, quasipoisson): while, with a subset of my data, I could get a perfectly reasonable model, once I include all of my data (17K+ observations, 29 variables), I get the following error: Error in if (any(y < 0)) stop("negative values not allowed for the quasiPoisson family") : missing value where
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)".