search for: maxit

Displaying 20 results from an estimated 545 matches for "maxit".

Did you mean: maxim
2012 May 15
6
Curva dosis-respuesta
...462 )), .Names = c("y", "dose"), row.names = c(NA, -9L), class = "data.frame") # curva # install.packages(''drm'') require(drm, quietly = TRUE, warn.conflicts = FALSE) with(d, plot(dose, y, las = 1)) fit <- drm(y ~ dose, fct = LL.4(), control = drmc(maxIt = 100000, relTol = 1e-4), data = d) # Error in optim(startVec, opfct, hessian = TRUE, method = optMethod, control = list(maxit = maxIt, : # non-finite finite-difference value [4] # Error in drmOpt(opfct, opdfct1, startVecSc, optMethod, constrained, warnVal, : # Convergence failed He cambiado u...
2009 Apr 03
1
Trouble extracting graphic results from a bootstrap
...g to extract a histogram over the results from a bootstrap. However I keep receiving the error message "Error in hist.default(boot.lrtest$ll, breaks = "scott") : 'x' must be numeric". The bootstrap I'm running looks like: > boot.test <- function(data, indeces, maxit=20) { + y1 <- fit1+e1[indeces] + mod1 <- glm(y1 ~ X1-1, maxit=maxit) + y2 <- fit2+e2[indeces] + mod2 <- glm(y2~1, maxit=maxit) + ll <- 2*(logLik(mod1)-logLik(mod2)) + ll + } > boot.lrtest <- boot(data=M1, statistic=boot.test, R=2000, maxit=100); > hist(boot.lrtest$ll, break...
2010 Feb 18
1
an error about " return some vectors from some functions within a function"
...################### # functions in the convg # ################### check1 <- function(sumgt,beta1.0,gamma.0,sigma.0){    if (any(!is.finite(sumgt))){        count1 <- count1+1        return(c(count1,beta1.0,gamma.0,sigma.0))    }   else {return(c(NaN,NaN,NaN,NaN))}  } check2 <- function(v0,maxit,iter,beta1.0,gamma.0,sigma.0){     if (is.nan(sum(v0))==TRUE | any(!is.finite(v0)) | maxit == iter){        count1 <- count1+1        return(c(count1,beta1.0,gamma.0,sigma.0))    }    else {return(c(NaN,NaN,NaN,NaN))}  } check3 <- function(maxit,diff,error,beta1.0,gamma.0,sigma.0){     if (...
2008 May 02
2
my first post to the list
...s expressed for fixed-x resampling. What I don't understand is: X=model.matrix, and the -1 under mod= rlm. Please see below: #fixed x-resampling fit <- fitted(mod.duncan.hub) e <- residuals(mod.duncan.hub) X <- model.matrix(mod.duncan.hub) boot.huber.fixed <- function(data, indices, maxit=20){ y <- fit + e[indices] mod <- rlm(y ~ X - 1, maxit=maxit) coefficients(mod) } duncan.fix.boot <- boot(Duncan, boot.huber.fixed, 1999, maxit=100) duncan.fix.boot I just need a quick explanation about WHAT the functions mean or do in this context. Thanks [[alternative HTML version del...
2005 Oct 21
1
change maxiter for nls
I typed the following commands but it still use maxiter=50 after the 2nd command: nls.control(maxiter = 1000) nls(......) Thanks! --------------------------------- [[alternative HTML version deleted]]
2005 Jun 02
1
nls.control: increasing number of iterations
Hello, I'm using the nls function and would like to increase the number of iterations. According to the documentation as well as other postings on R-help, I've tried to do this using the "control" argument: nls(y ~ SSfpl(x, A, B, xmid, scal), data=my.data, control=nls.control(maxiter=200)) but no matter how much I increase "maxiter", I get the following error message: Error in nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal)))), data = xy, : number of iterations exceeded maximum of 50 The second line here suggests that the maximum number of iterations...
2011 Jan 21
1
Maxiter specification in R
Dear R users, I'm having a problem with maxiter specification in VGLM function. I tried to increase the number of iteration to 100, but it still stopped at 30, which is the default. Here is my script: FIT <- vglm(SFH_PCT ~ RD_DEN + CAR_HH + TRS + RES_L, tobit(Lower=0), maxiter = 100) Thanks Gary [[alternative HTML version deleted]]
2007 Oct 23
0
API for optimization with Simulated annealing
Dear list, I was trying to use the R API for optimization method "Simulated annealing" void samin(int n, double *x, double *Fmin, optimfn fn, int maxit, int tmax, double temp, int trace, void *ex); but I encountered the following problem: The implementation of the function samin (as seen in src/main/optim.c) passes its void * argument "ex" into the function genptry (implemented in the same source file) and the function ge...
2011 Jan 05
0
Nnet and AIC: selection of a parsimonious parameterisation
...lt;- data.frame(syct = syct-2, mmin = mmin-3, mmax = mmax-4, cach=cach/256,chmin=chmin/100, chmax=chmax/100, perf) detach() CVnn.cpus <- function(formula, data = cpus3[cpus.samp, ], maxSize = 10, decayRange = c(0,0.2), nreps = 5, nifold = 10, alpha= 9/10, linout = TRUE, skip = TRUE, maxit = 1000,...){ #nreps=number of attempts to fit a nnet model with randomly chosen initial parameters # The one with the smallest RSS on the training data is then chosen nnWtsPrunning <-function(nn,data,alpha,i){ truth <- log10(data$perf) RSS=(1-alpha)*sum((truth[ri != i] - predi...
2001 May 16
0
glm.nb difficulties
...ance,jitter(tadT)) ## constant model tad.con <- glm.nb(tadT ~ 1, control=glm.control(trace=10)) log(mean(tadT)) ## OK, it got the mean right at least ... ## given more iterations to get where it's going, it goes ## out of control (and crashes) glm.nb(tadT ~ 1, control=glm.control(trace=10,maxit=100)) ## doesn't help to make an identity link glm.nb(tadT ~ 1,link=identity, control=glm.control(trace=10)) glm.nb(tadT ~ 1,link=identity, control=glm.control(trace=10,maxit=100)) ## also try as a function of distance tad.dist <- glm.nb(tadT ~ Distance) ## with trace/maxit set glm.nb(tadT...
2009 Sep 09
1
Package that does not work until I re write the exactly the same code
...So I make some verifications: --- 8< ---- class(dn) # [1] "ClusterizLongData" # attr(,"package") # [1] "kml" getMethod("kml","ClusterizLongData") # Method Definition: # # function (Object, nbClusters = 2:6, nbRedrawing = 20, saveFreq = 100, # maxIt = 200, trajMinSize = 2, print.cal = FALSE, print.traj = FALSE, # imputationMethod = "copyMean", distance, power = 2, centerMethod = meanNA, # startingCond = "allMethods", distanceStartingCond = "euclidean", # ...) #{ # nbIdFull <- nrow(Object["traj&...
2006 Jan 15
1
problems with glm
...e is an example: > success <- c(13,12,11,14,14,11,13,11,12) > failure <- c(0,0,0,0,0,0,0,2,2) > predictor <- c(0,80*5^(0:7)) > glm(cbind(success,failure) ~ predictor + 0, + family=binomial(link="log"), + control=glm.control(epsilon=1e-8,trace=TRUE,maxit=50)) Deviance = 3.348039 Iterations - 1 Error: subscript out of bounds In addition: Warning message: step size truncated: out of bounds > The model with intercept yields: > glm(cbind(success,failure) ~ predictor , + family=binomial(link="log"), + control=glm...
2012 Apr 14
1
R Error/Warning Messages with library(MASS) using glm.
...verage.Branch.Diameter+Average.Branch.Spacing+PC1*Average.Branch.Diameter+Average.Branch.Diameter*Average.Branch.Spacing+PC1*Average.Branch.Spacing) There were 50 or more warnings (use warnings() to see the first 50) > warnings() Warning messages: 1: In theta.ml(Y, mu, sum(w), w, limit = control$maxit, trace = control$trace > ... : iteration limit reached 2: In sqrt(1/i) : NaNs produced 3: In theta.ml(Y, mu, sum(w), w, limit = control$maxit, trace = control$trace > ... : iteration limit reached (ETC...CONTINUES ON THE SAME FOR 50 WARNINGS) > summary(model1) Call: glm.nb(formula =...
2002 Nov 16
0
Wishlist: allow NA values in medpolish (package 'eda') (PR#2298)
...rederic diff -ur R-1.6.1.old/src/library/eda/R/medpolish.R R-1.6.1/src/library/eda/R/medpolish.R --- R-1.6.1.old/src/library/eda/R/medpolish.R Mon Jan 31 21:01:52 2000 +++ R-1.6.1/src/library/eda/R/medpolish.R Sat Nov 16 15:18:07 2002 @@ -1,4 +1,5 @@ -medpolish <- function (x, eps=0.01, maxiter=10, trace.iter = TRUE) +medpolish <- function (x, eps=0.01, maxiter=10, trace.iter = TRUE, + na.rm = FALSE) { z <- as.matrix(x) nr <- nrow(z) @@ -8,19 +9,19 @@ c <- numeric(nc) oldsum <- 0 for(iter in 1:maxiter) { - rdelta <-...
2004 Jul 26
0
Problem with a while loop embedded in a function.
...purposes of this illustrative example, the parameters are fine. The result should be a list of the nlme object and 'OK' (which should be 5 for the example). I'm using R version 1.9.1 on Windows XP. Thanks for any thoughts, Ken ################ library(nlme) data(Loblolly) maxIter <- c(1, 1, 1, 1, 1) returnObject <- c(FALSE, FALSE, FALSE, FALSE, TRUE) nlsList.Object <- nlsList(SSasymp, Loblolly) M1 <- function(maxIter, returnObject) { ok <- FALSE OK <- 0 while(ok==FALSE) { OK <- OK + 1 nlme.control.parms <- list("maxI...
2006 Aug 04
1
gnlsControl
...nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal)))), data = xy, : step factor 0.000488281 reduced below 'minFactor' of 0.000976563 My first thought was to decrease minFactor but gnlsControl does not contain minFactor nor nlsMinFactor (see below). It does however contain nlsMaxIter and nlsTol which I assume are the analogs of maxiter and tol in nls.control. I would be happy to hear from anyone who has an idea on what parameters in gnlsControl to change to get convergence. Cheers Dan Coleman Genentech Inc. > gnlsControl function (maxIter = 50, nlsMaxIter =...
2009 May 12
0
Trouble with parametric bootstrap
Hi, I'm having trouble understanding how to construct a random number generator for a parametric bootstrap. My aim is to bootstrap a Likelihood Ratio statistic (under the null) for a linear model. The function at this point is given by boot.test.n01 <- function(data, indeces, maxit=20) { y1 <- fit1+se(e2)*rnorm(314) mod1 <- glm(y1 ~ X1-1, maxit=maxit) y2 <- fit2+se(e2)*rnorm(314) mod2 <- glm(y2~1, maxit=maxit) t <- 2*(logLik(mod1)-logLik(mod2)) t } boot.lrtest.n01 <- boot(data=M1, statistic=boot.test.n01, R=3999, maxit=100, sim="parametric", ran.g...
2006 Mar 16
1
lme4/Matrix: Call to .Call("mer_update_y"...) and LMEoptimize gives unexpected side effect...
...;LMEoptmize" and "LMEoptimize<-" are not exported from the namespace in Matrix, so I simply copied the LMEoptimize function and made it an ordinary function as shown below. Thanks in advance S?ren LMEoptimize <- function(x, value) { if (value$msMaxIter < 1) return(x) nc <- x at nc constr <- unlist(lapply(nc, function(k) 1:((k*(k+1))/2) <= k)) fn <- function(pars) deviance(.Call("mer_coefGets", x, pars, 2, PACKAGE = "Matrix"))...
2015 Jun 16
2
Regresión logística
Gracias! El 15 de junio de 2015, 16:54, Freddy Omar López Quintero < freddy.vate01 en gmail.com> escribió: > ?Holap.? > > ran out of iterations and failed to converge > > > ?Prueba aumentando el número de iteraciones, con el argumento maxit: > > ?GLM <- bigglm(In.hospital_death ~ GCS + BUN, data = DatosGLM, family = >> binomial(logit), maxit=1000)? > > > ?Salud.? > > -- > «No soy aquellas sombras tutelares > que honré con versos que no olvida el tiempo.» > > JL Borges > [[alternative HTML...
2009 Jul 24
1
Making rq and bootcov play nice
...er, it seems that bootcov passes arguments that rq.fit doesn't like, preventing the command from executing. Here is an example: e<-bootcov(rq(y~x),clust,B=10,fitter=rq.fit) (where clust is my clustering variable) results in Error in rq.fit.br(x, y, tau = tau, ...) : unused argument(s) (maxit = 15, penalty.matrix = NULL) In contrast, the lm.fit function seems to just ignore these arguments, resulting in the following warning: 10: In fitter(X[obs, , drop = FALSE], Y[obs, , drop = FALSE], maxit = maxit, : extra arguments maxitpenalty.matrix are just disregarded. Is there a way that...