Displaying 20 results from an estimated 47 matches for "qlogi".
Did you mean:
qlogic
2005 Aug 22
1
How to add legend of plot.Design function (method=image)? (if (!.R.) )
Hi,
When running
z <- plot(fit, age=NA, cholesterol=NA, perim=boundaries, method='image')
Legend(z, fun=plogis, at=qlogis(c(.01,.05,.1,.2,.3,.4,.5)),
zlab='Probability')
And after pointing the cursor to the plot() screen in R, I obtain the
following message:
Using function "locator(2)" to place opposite corners of image.legend
Error in Legend.plot.Design(z, fun = plogis, at = qlogis(c(0.0...
2009 Feb 26
1
using predict method with an offset
...152L, 160L, 160L), Incorrect = c(126L,
103L, 66L, 8L, 0L, 0L)), .Names = c("Contr", "Correct", "Incorrect"
), row.names = c("13", "15", "17", "19", "21", "23"), class = "data.frame")
q25 <- rep( qlogis( 0.25 ), nrow(c1) )
# offset defined in arguments
c1.glm <- glm( cbind(Correct, Incorrect) ~ Contr - 1, binomial,
c1, offset = q25 )
# offset defined in formula
c1f.glm <- glm( cbind(Correct, Incorrect) ~ Contr + offset(q25) -1,
binomial, c1 )
cc <- seq( 0, 1, len = 10 )
nd <- data....
2009 Oct 23
3
opposite estimates from zeroinfl() and hurdle()
Dear all,
A question related to the following has been asked on R-help before, but
I could not find any answer to it. Input will be much appreciated.
I got an unexpected sign of the "slope" parameter associated with a
covariate (diam) using zeroinfl(). It led me to compare the estimates
given by zeroinfl() and hurdle():
The (significant) negative estimate here is surprising, given
2011 Sep 01
3
betareg question - keeping the mean fixed?
Hello,
I have a dataset with proportions that vary around a fixed mean, is it
possible to use betareg to look at variance in the dispersion parameter
while keeping the mean fixed?
I am very new to R but have tried the following:
svec<-c(qlogis(mean(data1$scaled)),0,0,0)
f<-betareg(scaled~-1 | expt_label + grouped_hpi, data=data1, link.phi="log",
control=betareg.control(start=svec))
I understood that y~-1 could be used to give a fixed mean of 0.5 however I
get the following error:
Error in linkinv(x %*% beta + offset) :...
2012 Aug 10
0
error applying user-defined link function to lmer
...us postings on this list. I've also added the corresponding problems I encountered with each of these attempts.
1) I've used the link function as specified at https://stat.ethz.ch/pipermail/r-help/2007-August/138436.html
# define link function
halflogit=function(){
half.logit=function(mu) qlogis(2*mu-1)
half.logit.inv=function(eta) .5*plogis(eta)+.5
half.logit.deriv=function(eta) .5*(exp(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 =...
2008 Aug 21
1
pnmath compilation failure; dylib issue?
...ils.o pbeta.o pbinom.o pcauchy.o pchisq.o pexp.o pf.o pgamma.o
pgeom.o phyper.o plnorm.o plogis.o pnbeta.o pnbinom.o pnchisq.o pnf.o
pnmath.o pnorm.o pnt.o polygamma.o ppois.o pt.o ptukey.o punif.o
pweibull.o qbeta.o qbinom.o qcauchy.o qchisq.o qexp.o qf.o qgamma.o
qgeom.o qhyper.o qlnorm.o qlogis.o qnbeta.o qnbinom.o qnchisq.o qnf.o
qnorm.o qnt.o qpois.o qt.o qtukey.o qunif.o qweibull.o sign.o
stirlerr.o toms708.o -lgomp -F/Library/Frameworks/R.framework/.. -
framework R -Wl,-framework -Wl,CoreFoundation
ld: warning, duplicate dylib /Developer/SDKs/MacOSX10.4u.sdk/usr/local/
lib/lib...
2005 Oct 11
2
Logistic Regression using glm
...he standard binomial weights
n*p*(1-p). If you perform
output <- glm(p ~ x, family = binomial, weights = n)
you get a different result than if you perform the
logit transformation manually on p and perform
output <- lm(logit(p) ~ x, weights = w),
where logit(p) is either obtained from R with
qlogis(p) or from a manual computation of ln(p/1-p).
The difference seems to me to be too large to be
roundoff error. The only thing I can guess is that
the application of the weights in glm is different
than in a manual computation. Can anyone explain the
difference in results?
Daniel Pick
Princ...
2007 Mar 20
1
How does glm(family='binomial') deal with perfect sucess?
...value of x,
calculated across w observations. When I use glm
my.glm.obj=glm(y~x,family='binomial',weights=w)
the regression comes out fine, but if I try what I understand to be the
equivalent lm procedure (i.e. fitting a straight line to the logit
transformed y values):
my.lm.obj=lm(qlogis(y)~x,weights=w)
I get an error because, of course, logit(1) = log(1/0) = log(Inf) = Inf
(similarly, logit(0) = log(0/1) = log(0) = -Inf).
I'd be very interested to see how glm deals with these extremes.
Cheers,
Mike
--
Mike Lawrence
http://artsweb.uwaterloo.ca/~m4lawren
"The road...
2007 Aug 10
0
half-logit and glm (again)
...ta using this model, and I'd like to fit it. My data is
a data frame with 3 columns, "response" (0/1), "subject" (a factor), and
"condition" (another factor).
Here is my link definition:
#############################
halflogit=function(){
half.logit=function(mu) qlogis(2*mu-1)
half.logit.inv=function(eta) .5*plogis(eta)+.5
half.logit.deriv=function(eta) .5*(exp(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 =...
2009 Feb 23
0
length 1 offset in glm
...orrect = c(34L, 57L, 94L, 152L, 160L, 160L), Incorrect = c(126L,
+ 103L, 66L, 8L, 0L, 0L)), .Names = c("Contr", "Correct", "Incorrect"
+ ), row.names = c(NA, 6L), class = "data.frame")
glm(cbind(Correct, Incorrect) ~ Contr - 1, binomial,
data = c1, offset = qlogis(0.25))
Error in model.frame.default(formula = cbind(Correct, Incorrect) ~ Contr - :
variable lengths differ (found for '(offset)')
but not if it has the length of the number of rows of the data frame
glm(cbind(Correct, Incorrect) ~ Contr - 1, binomial,
data = c1, offset = rep(qlogi...
2008 Apr 03
1
help with R semantics
...etween zero and one.")
if (POD.ceiling - POD.floor < difference.criterion) stop
(paste("POD.ceiling-POD.floor difference must be greater than
",difference.criterion," to discourage answer-shopping.", sep=""))
linkfun <- function(mu) {
mu <- 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 &...
2009 Feb 25
2
[R] length 1 offset in glm (& lm)
This post about length 1 offsets on R help seems to have been ignored
(sorry deleted original email - is there a way to continue thread in
this case?)
https://stat.ethz.ch/pipermail/r-help/2009-February/189352.html
It does seem to be a bug, in that glm does not behave as documented. In
fact the same bug applies to lm as well.
I don't think the suggested fix works though - Y isn't
2009 Mar 17
3
R does not compile any more on FreeBSD 8.0-CURRENT
...inom.o rbinom.o rmultinom.o
dcauchy.o pcauchy.o qcauchy.o rcauchy.o dexp.o pexp.o qexp.o rexp.o
dgeom.o pgeom.o qgeom.o rgeom.o dhyper.o phyper.o qhyper.o rhyper.o
dnbinom.o pnbinom.o qnbinom.o rnbinom.o dpois.o ppois.o qpois.o rpois.o
dweibull.o pweibull.o qweibull.o rweibull.o dlogis.o plogis.o qlogis.o
rlogis.o dnchisq.o pnchisq.o qnchisq.o dnbeta.o pnbeta.o qnbeta.o pnf.o
pnt.o qnf.o qnt.o ptukey.o qtukey.o toms708.o wilcox.o signrank.o
ranlib libnmath.a
config.status: creating src/unix/Makefile
make: /usr/local/R-devel/srcunix: No such file or directory
*** Error code 2
Stop in /usr/local...
2005 Aug 22
0
How to add legend of plot.Design function ( method=image)?
...im=boundaries, method='image')
# draws image() plot
# don't show estimates where data are sparse
# doesn't make sense here since vars don't
interact
if(!.R.)Legend(z, fun=plogis, at=qlogis(c(.01,.05,.1,.2,.3,.4,.5)),
zlab='Probability') # gray scale or color legend for prob.
_______________________________________________________________________
Ir. Jan Verbesselt
Research Associate
Group of Geomatics Engineering
Department Biosystems ~ M³-BIORES
Vital Decosterstraat 1...
2009 Jul 21
0
Custom Link/Family for lmer
...ustom 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:
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, ")", se...
2009 Aug 21
1
Question about validating predicted probabilities
Hello,
Frank was nice enough to point me to the val.prob function of the Design
library.
It creates a beautiful graph that really helps me visualize how well my
model is predicting probabilities.
By default, there are two lines on the graph
1) fitted logistic calibration curve
2) nonparametric fit using lowess
Right now, the nonparametric line doesn't look very good.
The
2010 Jul 22
1
GLM Starting Values
Hello,
Suppose one is interested in fitting a GLM with a log link to binomial data. How does R choose starting values for the estimation procedure? Assuming I don't supply them.
Thanks,
Tyler
2010 Mar 26
1
Linear mixed models with custom link functions in R
...s with glm() is shown below to illustrate what I'm hoping to scale up
to a mixed model. Thanks very much for your time and thoughts.
-----------------
library(MASS)
logexp <- function(days = 1) ##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, ")", se...
2007 Feb 10
2
error using user-defined link function with mixed models (LMER)
...nction. Actually,
glmmPQL seems to work, but as I want to evaluate a suite of competing
models, I'd like to use ML or REML estimation methods in order to end
up with meaningful log-likelihoods.
Here's 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, ")",...
1997 Dec 13
1
R-beta: Compile error; R-0.60.1, Solaris 2.6, gcc 2.7.2.1
...cc -g -I../include -c dlnorm.c -o dlnorm.o
gcc -g -I../include -c plnorm.c -o plnorm.o
gcc -g -I../include -c qlnorm.c -o qlnorm.o
gcc -g -I../include -c rlnorm.c -o rlnorm.o
gcc -g -I../include -c dlogis.c -o dlogis.o
gcc -g -I../include -c plogis.c -o plogis.o
gcc -g -I../include -c qlogis.c -o qlogis.o
gcc -g -I../include -c rlogis.c -o rlogis.o
gcc -g -I../include -c dnbinom.c -o dnbinom.o
gcc -g -I../include -c pnbinom.c -o pnbinom.o
gcc -g -I../include -c qnbinom.c -o qnbinom.o
gcc -g -I../include -c rnbinom.c -o rnbinom.o
gcc -g -I../include -c pnchisq.c -o pnchisq....