search for: plogis

Displaying 20 results from an estimated 130 matches for "plogis".

2007 Sep 16
3
PLOGI errors
Hello, today we made some tests with failed drives on a zpool. (SNV60, 2xHBA, 4xJBOD connected through 2 Brocade 2800) On the log we found hundred of the following errors: Sep 16 12:04:23 svrt12 fp: [ID 517869 kern.info] NOTICE: fp(0): PLOGI to 11dca failed state=Timeout, reason=Hardware Error Sep 16 12:04:23 svrt12 fctl: [ID 517869 kern.warning] WARNING: fp(0)::PLOGI to 11dca failed. state=c
2012 May 03
1
overlapping confidence bands for predicted probabilities from a logistic model
...e bands to overlap, despite the statistically significant beta coefficient? There may be a good statistical reason for this, but I'm not aware of it. Many thanks, Malcolm Fairbrother n <- 120 set.seed(030512) x <- rbinom(n, 1, 0.5) dat <- within(data.frame(x), ybe <- rbinom(n, 1, plogis(-0.5 + x))) mod1 <- glm(ybe ~ x, dat, family=binomial) summary(mod1) # coefficient on x is statistically significant at the 0.05 level? almost at the 0.01 level pred <- predict(mod1, newdata=data.frame(x=c(0,1)), se.fit=T) with(pred, cbind(low = plogis(fit - 1.96*se.fit), est = plogis(fit),...
2009 Feb 04
2
overlay plot question
Greetings all, I have two logistic plots coming from two calls to plogis. The code is .x <- seq(-7.6, 7.6, length=100) plot(.x, plogis(.x, location=0, scale=1), xlab="x", ylab="Density", main="Logistic Distribution: location = 0, scale = 1", type="l") abline(h=0, col="gray") .y <- seq(-7.6, 7.6, length=10...
2011 May 05
7
Draw a nomogram after glm
...ariable Y (0/1) and 2 explanatory variables. Now I try to draw my nomogram with predictive value. I visited the help of R but I have problem to understand well the example. When I use glm fonction, I have a problem, thus I use lrm. My code is: modele<-lrm(Y~L+P,data=donnee) fun<- function(x) plogis(x-modele$coef[1]+modele$coef[2]) f <- Newlabels(modele,c(L="poids",P="taille")) nomogram(f, fun=list('Prob Y<=1'=plogis), fun.at=c(seq(0,1,by=.1),.95,.99), lmgp=.1, cex.axis=.6) fun.at=c(.01,.05,seq(.1,.9,by=.1),.95,.99), lmgp=.2, cex...
2008 Aug 14
3
extending the derivs table/fools rushing in
I added "plogis" to the derivative table in the development version of R; the patch against yesterday's R-devel src/deriv/main.c is available at http://www.zoology.ufl.edu/bolker/deriv_patch.txt . I pretty much followed the framework of the other symbols; here was my incantation - } else if (CAR(expr...
2010 Jul 31
3
I have a problem
...le','male'), n,TRUE)) # Specify population model for log odds that Y=1 L <- .4*(sex=='male') + .045*(age-50) + (log(cholesterol - 10)-5.2)*(-2*(sex=='female') + 2*(sex=='male')) # Simulate binary y to have Prob(y=1) = 1/[1+exp(-L)] y <- ifelse(runif(n) < plogis(L), 1, 0) ddist <- datadist(age, blood.pressure, cholesterol, sex) options(datadist='ddist') f <- lrm(y ~ lsp(age,50)+sex*rcs(cholesterol,4)+blood.pressure) nom <- nomogram(f, fun=function(x)1/(1+exp(-x)), # or fun=plogis fun.at=c(.001,.01,.05,seq(.1,.9,by=.1),.95,.99,.999), funlab...
2008 Nov 08
3
Fitting a modified logistic with glm?
...= 20 scale = 30 # choose some x values x = runif(200,-200,200) # generate some random noise to add to x in order to # simulate real-word measurement and avoid perfect fits x.noise = runif(length(x),-10,10) # define the probability of success for each x given the modified logistic prob.success = plogis(x+x.noise,location,scale)*.5 + .5 # obtain y, the observed success/failure at each x y = rep(NA,length(x)) for(i in 1:length(x)){ y[i] = sample( x = c(1,0) , size = 1 , prob = c(prob.success[i], 1-prob.success[i]) ) } #show the data and the source modified logistic...
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 = ql...
2012 Mar 29
1
Problem about dovecot Panic
Good morning, we have 2 Redhat Enterprise 5.7 machines, they are a cluster with some mail services in it (postfix and dovecot 2). The version of dovecot is dovecot-2.0.1-1_118.el5 (installed via rpm). >From last week we have this dovecot problem: suddenly dovecot doesn't accept any new connections, the dovecot.log file reports lines like these Mar 15 12:38:54 secchia dovecot: imap:
2007 Feb 24
2
Depending on many packages: another best practice question
Dear all, ggplot currently requires 13 packages (grid, reshape, RColorBrewer, proto, splines, MASS, Hmisc, boot, butler, hexbin, mapproj, quantreg, sm). Some of these are absolutely necessary (eg. proto), but most are used for one or two specific tasks (eg. boot is only used to get plogis, used for logit scales). Do you think I should make them all "depends" packages, or "suggests" packages, and then manually test for package presence before using a certain function? What is easier for users? Thanks, Hadley
2012 Oct 20
1
Logistic regression/Cut point? predict ??
...at x equal zero, I did not get .50) I am basically testing the performance of classifiers. Here is the code: n <- 1000; # Sample size fitglm <- function(sigma,tau){ x <- rnorm(n,0,sigma) intercept <- 0 beta <- 5 * ystar <- intercept+beta*x* * z <- rbinom(n,1,plogis(ystar))* *# I believe plogis accepts the a +bx augments and return the e^x/(1+e^x) which is then used to generate 0 and 1 data* xerr <- x + rnorm(n,0,tau) # error is added here model<-glm(z ~ xerr, family=binomial(logit)) int<-coef(model)[1] slope<-coef(model)[2]...
2010 Oct 04
2
i have aproblem --thank you
...place=TRUE),labels=c("F","M")) > Smoking<-factor(sample(0:1, 100, replace=TRUE),labels=c("No","yes")) > dfr$L<-with(dfr,0.559*as.numeric(T.Grade)-0.896*as.numeric(Smoking)+0.92*as.numeric(Sex)-1.338) > dfr$y <- with(dfr, ifelse(runif(n) < plogis(L), 1, 0) ) > dfr <- data.frame(T.Grade,Sex,Smoking, L, y) > ddist <- datadist(dfr) > options(datadist='ddist') > f<-lrm(y~T.Grade +Sex+Smoking, data=dfr) > nom<-nomogram(f,fun=function(x)1/(1+exp(-x)),fun.at=c(.01,.05,seq(.1,.9,by=.2),.9,1),funlabel="Risk...
2010 Oct 04
1
I have aproblem about nomogram--thank you for your help
...;G1", "G2","G3")) > Sex<-factor(0:1,labels=c("F","M")) > Smoking<-factor(0:1,labels=c("No","yes")) > L<-0.559*as.numeric(T.Grade)-0.896*as.numeric(Smoking)+0.92*as.numeric(Sex)-1.338 > y <- ifelse(runif(n) < plogis(L), 1, 0) > ddist <- datadist(as.numeric(T.Grade,Sex,Smoking)) load package "rms" > ddist <- datadist(as.numeric(T.Grade,Sex,Smoking)) > options(datadist='ddist') > f<-lrm(y~as.numeric(T.Grade)+as.numeric(Sex)+as.numeric(Smoking)) ??? error to:model.frame....
2006 Jun 22
1
As.Factor with Logistic Regression
I am modeling the probability of player succeeding in the NFL with a binomial logistic regression with 1 signifying success and 0 signifying no success. I performed the regression of the binomial variable against overall draft position using the college conference for which each player played as a factor using the as.factor(Conference) command. My question is: How do I plot specific factors
2008 Jan 04
1
Multi-dimensional function.
...similar. Any help will be greatly appreciated! The problem is as follows. I have a matrix Z with dimensions c(m, p). I have two vectors Gamma and Th with length p. What I want to do is, for j in 1:p, for each pair (Gamma[j], Th[j]), apply the logistic function to each column of z, using plogis(Z[,j], Th[j], 1/Gamma[j]). Then, by concatenating the result of each iteration I would obtain a matrix lZ with dimensions c(m, p). Now, the question is: is there a neat way to do this in a single step, i.e., without the obvious loop? I have a not-so-good relationship with the "apply&q...
2006 Mar 23
1
AIC mathematical artefact or computation problem ?
Dear R user, I have made many logistic regression (glm function) with a second order polynomial formula on a data set containing 440 observation of 96 variables. I?ve made the plot of AIC versus the frequency (presence/observations) of each variable and I obtain a nearly perfect arch effect with a symmetric axe for a frequency of 0.5 . I obtain the same effect with deterministic data. Maybe
2005 Feb 20
1
logistic regression and 3PL model
...uessing base rate. Dr. Ripley suggested that I modify a maximum likelihood fitting of a binomial logistic regression presented in MASS$ (p. 445): logitreg <- function(x, y, wt=rep(1, length(y)), intercept = T, start=rep(0,p), ...) { fmin <- function (beta, X, y, w){ p <- plogis(X %*% beta) -sum(2 * w * ifelse(y, log(p), log(1-p))) } gmin <- function (beta, X, y, w) { eta <- X %*% beta; p <- plogis(eta) -2 * (w *dlogis(eta) * ifelse(y, 1/p, -1/(1-p))) %*% X } if(is.null(dim(x))) dim(x) <- c(length(x), 1)...
2012 Oct 25
2
How to extract auc, specificity and sensitivity
I am running my code in a loop and it does not work but when I run it outside the loop I get the values I want. n <- 1000; # Sample size fitglm <- function(sigma,tau){ x <- rnorm(n,0,sigma) intercept <- 0 beta <- 0 ystar <- intercept+beta*x z <- rbinom(n,1,plogis(ystar)) xerr <- x + rnorm(n,0,tau) model<-glm(z ~ xerr, family=binomial(logit)) int<-coef(model)[1] slope<-coef(model)[2] pred<-predict(model) result<-ifelse(pred>.5,1,0) accuracy<-length(which(result==z))/length(z) accuracy rocpreds&lt...
2011 May 15
5
Question on approximations of full logistic regression model
...1.0000 1.1104 -0.1104 1.1104 1000 Emax 0.0000 0.0000 0.0444 0.0444 0.0444 1000 Validatin revealed this approximation was not bad. Then, I made a nomogram. > full.approx.lrm.nom <- nomogram(full.approx.lrm, fun.at=c(0.05,0.1,0.2,0.4,0.6,0.8,0.9,0.95), fun=plogis) > plot(full.approx.lrm.nom) Another nomogram using ols model, > full.ols.approx.nom <- nomogram(full.ols.approx, fun.at=c(0.05,0.1,0.2,0.4,0.6,0.8,0.9,0.95), fun=plogis) > plot(full.ols.approx.nom) These two nomograms are very similar but a little bit different. My questions are;...
2005 Sep 25
2
getting variable length numerical gradient
Hi all. I have a numerical function f(x), with x being a vector of generic size (say k=4), and I wanna take the numerically computed gradient, using deriv or numericDeriv (or something else). My difficulties here are that in deriv and numericDeric the function is passed as an expression, and one have to pass the list of variables involved as a char vector... So, it's a pure R programming