search for: ymax

Displaying 20 results from an estimated 214 matches for "ymax".

Did you mean: max
2013 May 18
3
bar plot with non-zero starting level
Hi, I want to plot grouped bars to compare 95% confidence interval estimates from two models. Each bar represents a 95% confidence interval estimate of a coefficient from one of the two models. Each group represents confidence interval estimates of the same coefficient from the two models. I think such a bar plot will nicely present whether 95% confidence interval estimates of the same
2010 Apr 04
4
ggplot2 geom_rect(): What am I missing here
...ation of the cycle (in months). In other words, all rectangles have coordinates (start, duration) and (end, duration). rr I've spent hours trying to figure out the documentation and pouring over Google and RSeek searches and am at an impasse. The documentation refers to xmin, xmax, ymin, and ymax but doesn't say anything about them. The only example gives them both as vectors, so I assume they refer to a sequence of coordinates in which each rectangle's vertices is given by (xmin[i],ymin[i]), (xmin[i],ymax[i]), (xmax[i],ymax[i]), and (xmax[i],ymin[i]). But when I try to plot som...
2003 Jul 24
5
inverse prediction and Poisson regression
...ily=poisson()) (that's why you see the "dose[-1]" term. The "first" dose in the dose vector is 0. This is really a nice fit. I can obtain a nice slope (B) and intercept (A): log(Y) = B log(x) + A I do have a biological value for dose = 0 from my "control". i/e Ymax = some number with a Poisson error again So, what I want is EC50x : Y/Ymax = 0.5 = exp(B log(EC50x) + A) / Ymax exp((log(0.5) + Log(Ymax)) - A)/B) = EC50x That's all fine, except I don't have a clue on how to calculate the confidence intervals of EC50x or even if I can model this invers...
2008 Jul 29
4
Graphics function question
Hello I have created a graph using the following commands: <<< startBReP3O1T <- diffs$BReP3O1T - diffs$diff_BReP3O1T endBReP3O1T <- diffs$BReP3O1T x <- seq(47,89, length = 10) ymin <- min(min(startBReP3O1T), min(endBReP3O1T)) ymax <- max(max(startBReP3O1T), max(endBReP3O1T)) y <- seq(ymin, ymax, length = 10) plot(x,y, type = 'n', xlab = 'Age', ylab = 'BReP3O1T', main = 'Age, decline and BReP3O1T') segments(x0 = startage, x1 = endage, y0 = startBReP3O1T, y1 = endBReP3O1T, col = decline)...
2003 Sep 17
1
plot.hclust: dendrogram too large for window (PR#4197)
...within the window. I propose the fix listed below. src/main/ --- plot.c Wed Sep 17 01:03:39 2003 +++ plot.c.new Wed Sep 17 01:21:59 2003 @@ -3314,7 +3314,7 @@ SEXP do_dendwindow(SEXP call, SEXP op, SEXP args, SEXP env) { int i, imax, n; - double pin, *ll, tmp, yval, *y, ymin, ymax, yrange; + double pin, *ll, tmp, yval, *y, ymin, ymax, yrange, m; SEXP originalArgs, merge, height, llabels, str; char *vmax; DevDesc *dd; @@ -3357,8 +3357,14 @@ ll = (double*)R_alloc(n, sizeof(double)); dnd_lptr = &(INTEGER(merge)[0]); dnd_rptr = &(INTEGER...
2007 Jul 29
1
behavior of L-BFGS-B with trivial function triggers bug in stats4::mle
...matrix(numeric(0),0,0) or something along those lines. Or one could change L-BFGS-B to behave the same as the other methods. cheers Ben Bolker --------------------- library(stats4) ## using example from ?mle x <- 0:10 y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8) ll <- function(ymax=15, xhalf=6) -sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE)) ## fix one parameter to get 1D profile fit2 <- mle(ll, fixed=list(xhalf=6)) profile(fit2) ## same again with method="L-BFGS-B" fit3 <- mle(ll, fixed=list(xhalf=6),method="L-BFGS-B") profile(fit3) ll...
2012 Feb 03
1
incomplete final line found on <name of my sourced function file>
...8B4500", "#FF7F00","#9370DB", "#800000","#104E8B","#228B22")[20:1] myagg<-aggregate(indata[invars],by=indata[datesvar],FUN=myfunction) yrange=range(pretty(as.matrix(myagg[2:length(myagg)]))) if(fixedy==0){ ymin<-yrange[1] ymax<-yrange[2]} else { ymin<-0 ymax<-yrange[2]} ydistance<-ymax-ymin if(ydistance>0.1 & ydistance<=1){mystep<-0.1} else { if(ydistance>1 & ydistance<=10){mystep<-1/2} else { if(ydistance>10 & ydistance<=100) {mystep<-10/5} else {...
2004 Dec 03
1
How to wrap or split labels on plot
...byrow=TRUE) # Read in and attach labels (names) to data rownames(test) <- c("Mount Pleasant","Jordan","Oil City","Pleasant Valley","Village of Lake Isabella","Rosebush") # Set plot limits: xmax <- nrow(test) nvec <- ncol(test) ymax <- ceiling(max(test)) yinc <- 1 # Generate Pareto order test <- test[order(test[,1],decreasing=TRUE),] # Set color palette MyCols <- rep(c("lightcyan","cornsilk","lavender"), each = xmax) # Adjust the margins par(mar = c(7, 5, 6, 3)) # Bar graph mp <...
2010 Jun 15
2
Unspecified [upper] xlim/ylim?
...quence of a simulation, whereas I know that it cannot be less than (say) 0; and I want to fix the lower limit at 0 in any plot, leaving the upper limit to be assigned by plot() as a result of the computed values. I know I can do this by determining the max() of the data, and then computing a "Ymax" to put in (say) ylim = c(0,Ymax). However, for certain reasons, I would prefer not to have to do this. (And it's just a preference ... ). Whereas one can leave the whole issue of setting both plotting limits to plot(), by not specifying ylim (or xlim), or one can explcitily specify both...
2009 Aug 06
2
Ylim
....6,cex.lab=1.6,cex.axis=1.6) par(mfrow = c(3,4)) ifn <- "T.dat" trait <- read.table(ifn) i <- 1 j <- 1 for(k in 1:12) { dat <- data[i:(i+2), ] colnames(dat)<-c("SM","E","NP) Ymin <- if( min(dat$SM) < 0.0 ) (dat$SM - dat$E) else 0.0 Ymax <- if( max(dat$SM) > 0.0 ) (dat$SM + dat$E) else 0.0 Graph<-barplot(dat$SM, names.arg=dat$NP, main = trait[j:j,], xlab = data[i:i,1:1], ylim = c(Ymin,Ymax) ) segments(Graph, dat$SM + dat$E, Graph, dat$SM - dat$E) i <- i + 3 j <- j + 1 } dev.off() And the error message is: Error...
2007 Dec 06
1
suggested modification to the 'mle' documentation?
...advertise this fact, e.g., by adding one of the two examples appearing below. Best Wishes, Spencer Graves ################################ x <- 0:10 y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8) # Pass data via function arguments rather than global variables ll.5 <- function(ymax=15, xhalf=6, x., y.) -sum(stats::dpois(y., lambda=ymax/(1+x./xhalf), log=TRUE)) (fit.5 <- mle(ll.5, start=list(ymax=15, xhalf=6), fixed=list(x.=x, y.=y))) ll3 <- function(lymax=log(15), lxhalf=log(6), x., y.) -sum(stats::dpois(y., lambda=exp(lymax)/(1+x./exp...
2010 Nov 04
5
ggplot output
Dear All, I have this script: dat <- data.frame(Month = hstat$Date,C_avg = hstat$C.avg,C_stdev = hstat$C.stdev) ggplot(data = dat, aes(x = Month, y = C_avg, ymin = C_avg - C_stdev, ymax = C_avg + C_stdev)) + geom_point() + geom_line() + geom_errorbar() dat <- data.frame(Month = hstat$Date,K_avg = hstat$K.avg,K_stdev = hstat$K.stdev) ggplot(data = dat, aes(x = Month, y = K_avg, ymin = K_avg - K_stdev, ymax = K_avg + K_stdev)) + geom_point() + geom_line() + geom_er...
2001 Oct 23
0
problems with postscript device
...Imedian <- quantile(meds, c(0.025, 0.5, 0.975)) CImean <- quantile(means, c(0.025, 0.5, 0.975)) hmean <- hist(means, freq = FALSE, plot = FALSE) hmeds <- hist(meds, freq = FALSE, plot = FALSE) split.screen(c(1, 2)) xlims <- range(c(hmean$breaks, hmeds$breaks)) ymax <- max(c(hmean$density, hmeds$density)) screen(1) plot(hmean, freq = FALSE, col = "red", xlim = xlims, ylim = c(0, ymax), xlab = paste("Sampling dist. of mean of ", xname), main = "") bringToTop() if (norm) { n <- length(...
2008 Jul 30
1
read XML
...coding="UTF-8" ?> - <layout> <name>Layout 2</name> <pagesByX>1</pagesByX> <pagesByY>1</pagesByY> - <elements> <legend refParent="r3" xmax="0.54156171284634758" xmin="0.020151133501259435" ymax="0.31480598161051165" ymin="0.042461931948864044" /> <component background="auto" border="none" borderDegMinSec="false" borderEachPage="true" borderFont="Tahoma, 8" borderFore="#000000" borderMargin="12&q...
2006 Dec 30
3
wrapping mle()
Hi, How can we set the environment for the minuslog function in mle()? The call in this code fails because the "ll" function cannot find the object 'y'. Modifying from the example in ?mle: library(stats4) ll <- function(ymax=15, xhalf=6) { -sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE)) } fit.mle <- function(FUN, x, y) { loglik.fun <- match.fun(FUN) mle(loglik.fun, method="L-BFGS-B", lower=c(0, 0)) } fit.mle("ll", x=0:10, y=c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8)) How sh...
2002 Feb 11
0
profile
...PopStd <- 90468 beta <- Beta DIs <- Dls MnmN <- Nmin OptN <- Nopt1 # define model function Y.model <- function(gN, MnmN, OptN, DIs, beta, eta1, eta2, Popn, Dmax, AWC, SumEp, PotYield3, Nsupply) { Ymax<- 1-ifelse(Popn<=PopStd, eta1, eta2)*log(Popn/PopStd) Ymax <- Ymax*PotYield3*Popn/1000 Ymax <- Ymax*ifelse(Dmax<=DIs*AWC, 1, 1 - beta*(Dmax -DIs*AWC)/SumEp) Nstar <- (Nsupply- MnmN*Ymax) / (OptN*Ymax - MnmN*Ymax) Nsta...
2006 Jun 25
0
Fighting with GDD & lwd
...ing and installing the GDD package under my FreeBSD 6.1 box after eliminating ifdef DEBUG ? ?PKG_CFLAGS+=-DJGD_DEBUG endif in Makevars.in Now, with the following code .............................................. grafico1<- function() { plot(1:length(tabella[,1]),tabella[,2],ylim=c(Ymin,Ymax),type="h", lwd=6,col="red",main=paste("TEMPERATURE MEDIE GIORNALIERE\nMESE DI", toupper(format(ierid,"%B")),sep=" "), col.main="dark blue", xlab="Giorni del mese",ylab="?C", col.lab="blue",axes=FALS...
2009 Feb 01
2
Extracting Coefficients and Such from mle2 Output
The mle2 function (bbmle library) gives an example something like the following in its help page. How do I access the coefficients, standard errors, etc in the summary of "a"? > x <- 0:10 > y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8) > LL <- function(ymax=15, xhalf=6) + -sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE)) > a <- mle2(LL, fixed=list(xhalf=6)) > summary(a) Maximum likelihood estimation Call: mle2(minuslogl = LL, fixed = list(xhalf = 6)) Coefficients: Estimate Std. Error z value Pr(z) ymax 19.2881 1.7...
2011 Jan 24
1
ggplot2 - ribbon
Dear List, I am having trouble setting the transparency of a ribbon in ggplot2 and was wondering if anybody had any suggestions so far i have a plot exactly as i want it and i want to add a ribbon connecting the ymax and ymin, whci i do with the following command m10 + stat_summary(geom="ribbon", fun.ymin="min", fun.ymax="max") However the ribbon is a dark grey and i want to make it much lighter or change the colour. I was wondering if anybody had any ideas? I have kept the code...
2009 Sep 21
1
How to use nls when [selfStart] function returns NA or Inf??
...growth over time. The specific model giving me problems at the moment is only one of a whole class of such models which I need to work with. I specify it here to illustrate that it is not always obvious what the bounds on the parameters are. SSbaranyiBR94<-selfStart( model=function(Time, y0, ymax, mu, lambda, m = 1, v = mu) { #+ # From the paper Baranyi J. & Roberts T. A. (1994). A dynamic approach to predicting bacterial growth in food. Int J. of Fd. Micro. 23. 277-294 # Papers equations (6), (5b), (4b) # eq 4b: y(Time) = y0 + mu' * A(Time) - ln(1+(exp(m' * mu' * A(Tim...