search for: ysim

Displaying 6 results from an estimated 6 matches for "ysim".

Did you mean: ylim
2012 Apr 24
1
Use of optim to fit two curves at the same time ?
...###################################################################### ## function 1 x1 <- 1:100 y1 <- 5.468 * x + 3 # + rnorm(100,0, 10) dfxy <- cbind(x1,y1) # Objective function optfunc <- function(x, dfxy){ a <- x[1] b <- x[2] xtest <- dfxy[,1] yobs <- dfxy[,2] ysim <- a*xtest + b sum((ysim - yobs)^2) } out<- optim(par=c(0.2,5), fn=function(x){optfunc(x, dfxy)}, method = "Nelder-Mead", hessian = F) ## function 2 x2 <- seq(0.01, 0.1, length=100) y2 <- exp(30*x2) dfxy2 <- cbind(x2,y2) # objective function optfunc2 <- function(x...
2013 Jul 05
3
should the text for RIGHT_ASSIGN be -> in getParseData()?
Hi, The text column for '->' becomes '<-' in the data frame returned by getParseData(): > getParseData(parse(text='1->x')) line1 col1 line2 col2 id parent token terminal text 7 1 1 1 4 7 0 expr FALSE 1 1 1 1 1 1 2 NUM_CONST TRUE 1 2 1 1 1 1 2 7 expr FALSE 3
2011 Mar 04
1
grouping data
...093 -87.85092 -87.85081 -87.85074 -87.85070 [8] -87.85070 -87.85060 -87.85059 -87.85053 -87.85046 -87.85046 -87.85042 [15] -87.85037 -87.85028 -87.85026 -87.85026 -87.85025 -87.85023 -87.85019 [22] -87.85015 -87.85007 -87.85003 -87.85000 -87.84970 -87.84957 -87.84957 [29] -87.84947 -87.84941 > (ysim <- sort(rnorm(30, ymn, ysd))) [1] 33.90227 33.90237 33.90239 33.90240 33.90243 33.90248 33.90249 33.90251 [9] 33.90251 33.90262 33.90262 33.90266 33.90267 33.90268 33.90272 33.90274 [17] 33.90274 33.90278 33.90283 33.90286 33.90286 33.90294 33.90295 33.90301 [25] 33.90304 33.90316 33.90317 33....
2013 Nov 19
1
como agrego una linea dibujada con abline() en la leyenda de un grafico ?
...en todos casos crear una curva con valores constantes, habría que intentar, pero labcurve en algunos ejemplos en mi computadora no anda. Ayer envié dos correos, el primero era de latticeextra, usted nombra lattice, pero podría funcionar, en latticeextra: ## horizontal and vertical lines xyplot(ysim ~ xsim) + layer(panel.ablineq(v = 3, pos = 4, at = 0.1, lty = 2, label = "3.0 (critical value)")) + layer(panel.ablineq(h = mean(ysim), pos = 3, at = 0.15, lty = 2, varNames = alist(y = plain(mean)(y)))) Javier Marcuzzi El 19/11/13...
2013 Nov 19
2
como agrego una linea dibujada con abline() en la leyenda de un grafico ?
Eric Recordé un ejemplo rápido ## Setup up coordinate system (with x == y aspect ratio): plot(c(-2,3), c(-1,5), type = "n", xlab = "x", ylab = "y", asp = 1) ## the x- and y-axis, and an integer grid abline(h = 0, v = 0, col = "gray60") text(1,0, "abline( h = 0 )", col = "gray60", adj = c(0, -.1)) abline(h = -1:5, v = -2:3, col =
2002 Jun 21
3
generating points over a function, its possible???
Hi, I have a new (for me) situation. I have a function for one linear model: y = 9.7909-0.035*x I have the variance of system var = 13.01403 Is possible to create a random vector points of Y (simulating the real data) over this curve using the function and the variance? I need this to a discipline. I have this: | \ | \ -> y = 9.7909-0.035*x and var = 13.014 | \ | \ | \ | \