similar to: skip non-converging nls() in a list

Displaying 20 results from an estimated 500 matches similar to: "skip non-converging nls() in a list"

2008 Feb 15
2
lmList, tapply() and lm()
Howdee, *** I know that the lmList() function exists, yet I don't want to use it. *** Would anyone be kind enough to tell how I can apply the function lm() to each level of a given factor so to obtain the intercept and slope for each factor level within a matrix? For instance, suppose a dataframe containing 3 variables: id, x and y. I want to compute the function lm() for each level
2005 Mar 02
1
Applying a function to all combinations of factors
Is there a way to apply a function, say cor(), to each combination of some number of variables, and this, without using loops? For example, I have day, hour, var1 and var2. How could I compute cor(var1,var2) for each day*hour combination and obtain a matrix with day, hour and the cor value for each combination? Thanks for your time, Marc =================== Marc Bélisle Professeur adjoint
2003 Oct 31
4
dnorm() lead to a probability >1
Howdee, One of my student spotted something I can't explain: a probability >1 vs a normal probability density function. > dnorm(x=1, mean=1, sd=0.4) [1] 0.9973557 > dnorm(x=1, mean=1, sd=0.39) [1] 1.022929 > dnorm(x=1, mean=1, sd=0.3) [1] 1.329808 > dnorm(x=1, mean=1, sd=0.1) [1] 3.989423 > dnorm(x=1, mean=1, sd=0.01) [1] 39.89423 > dnorm(x=1, mean=1, sd=0.001) [1]
2008 Feb 19
0
nlsList - Error in !unlist(lapply(coefs, is.null))
Howdee, I am able to fit a 4-parameter logistic growth curve to a dataset which comprise many individuals (using R v. 2.3.1). Yet, if I want to obtain the parameters for each individual (i.e., for each 'id') using nlsList, then I obtain an Error message which I have trouble interpreting. Any advice as to how I can solve this problem? Thanks for your time, Marc > reg <-nls(mass ~
2009 Jun 05
3
from 3 numeric variables to a string
Hi there, I have 3 numeric variables: day (e.g., 05), month (e.g., 06), year (e.g., 2009). I would like to create a (string) variable of the following form: month/day/year (e.g., 06/05/2009). I would be grateful to anyone who could point me toward a solution. Sincerely, Marc =================== Marc B?lisle Professeur agr?g? Chaire de recherche du Canada en ?cologie spatiale et en ?cologie
2008 Jan 29
0
number of rescaling cycles in decorana
How do one dertermine the optimal number of rescaling cycles to use when performing DCA using the decorana function (library vegan)? Thanks for your time, Marc =================== Marc Bélisle Professeur adjoint Chaire de recherche du Canada en écologie spatiale et en écologie du paysage Département de biologie Université de Sherbrooke 2500 Boul. de l'Université Sherbrooke, Québec J1K 2R1
2009 Aug 28
1
how to explain the interaction terms regarding "treatment contrast" of lm model
Dear list, I am confused on how to explain the interaction term in the context of "treatment contrast". for example, I have an data frame as below: sub group val 1 a group1 3.685625 2 a group1 3.407445 3 a group1 4.040920 4 a group1 2.890875 5 b group1 3.853280 6 b group1 4.113585 7 b group1 3.043250 8 b group1 3.800920 9 c group1 5.394305 10 c
2007 May 17
4
bug or feature?
R version 2.5.0, under gentoo linux. This may be just my ignorance about naming conventions inside loops and subsets, but the following appears like a bug to me. y = c( 1963, 1963, 1964, 1964, 1965, 1965 ); r1= rnorm(6); d= data.frame ( y=y, r1=r1 ); ## note: I am not attach()ing anything anywhere ## this should give me two results, which it does ahw.y= subset(d, d$y==1963);
2011 Jun 17
3
rle on large data . . . without a for loop!
I think need to do something like this: dat<-data.frame(state=sample(id=rep(1:5,each=200),1:3, 1000, replace=T,prob=c(0.7,0.05,0.25)),V1=runif(1,10,1000),V2=rnorm(1000)) rle.dat<-rle(dat$state) temp<-1 out<-data.frame(id=1:length(rle.dat$length)) for(i in 1:length(rle.dat$length)){ temp2<-temp+rle.dat$length[[i]] out$V1[i]<-mean(dat$V1[temp:temp2])
2006 Aug 04
1
gnlsControl
When I run gnls I get the error: Error in 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
2007 Jun 14
0
nlsList problems: control option does not effect output and strange environment search
Dear R-helpers, I'm using R 2.5.0 under Windows and am trying to use nlsList from nlme 3.1-80 with the selfstart function for the four parametric logistic function. My first test went well, but now I'm trying to do some more sophisticated things and it does not work anymore. I simulate my data from a five parametric logistic function like this:
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
2005 Apr 23
1
start values for nls() that don't yield singular gradients?
I'm trying to fit a Gompertz sigmoid as follows: x <- c(15, 16, 17, 18, 19) # arbitrary example data here; y <- c(0.1, 1.8, 2.2, 2.6, 2.9) # actual data is similar gm <- nls(y ~ a+b*exp(-exp(-c*(x-d))), start=c(a=?, b=?, c=?, d=?)) I have been unable to properly set the starting value '?'s. All of my guesses yield either a "singular gradient" error if they
2001 Nov 06
2
Canonical Correspondence analysis-CoCoAn package
Hi R-users, I am new to R environment.I want to carry out a correspondence analysis on a contigency table with 64 columns and 298 observation of Environmental data.In many cells of the contigency table the frequency is just the value '1'. I got the following error. > CAIV(Eplankton) Error in if (L[i, j] < 0) return("Table L must contain non-negative numbers") :
2001 May 29
3
geary statistics
Hello, i' m looking for a function to compute geary statistic for spatial correlation. Thanks. -- St?phane DRAY --------------------------------------------------------------- Biom?trie et Biologie ?volutive - Equipe "?cologie Statistique" Universite Lyon 1 - Bat 711 - 69622 Villeurbanne CEDEX - France Tel : 04 72 43 27 56 Fax : 04 78 89 27 19 04 72 43 27 57 E-mail
2005 Feb 28
5
persistance of factor levels in a data frame
Hi, Just something I don't understand: data <- data.frame(V1=c(1:12),F1=c(rep("a",4),rep("b",4),rep("c",4))) data_ac <- data[which(data$F1 !="b"), ] levels(data_ac$F1) Why the level "b" is always present ? thanks Tristan, R 2.0.1 for Linux Fedora 3 -- ------------------------------------------------------------ Tristan
2002 Jul 18
2
RODBC and Excel Files
Hello, I am trying to play with RODBC library and Excel Files. In my file (doubs.xls) there are 2 spreadsheets: > library(RODBC) > connection<-odbcConnect("Excel Files") > sqlTables(connection) TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS 1 F:\\Th?se\\R\\Doubs NA Faune$ SYSTEM TABLE NA 2 F:\\Th?se\\R\\Doubs NA Milieu$
2004 Jul 07
1
AW: boxplot a list of objects
One possibility ist boxplot(sapply(ListOfNames, get, env = .GlobalEnv)) Hope that this helps Thomas -----Urspr??ngliche Nachricht----- Von: Lefebure Tristan [mailto:Tristan.Lefebure at univ-lyon1.fr] Gesendet: Mittwoch, 7. Juli 2004 10:34 An: r-help at stat.math.ethz.ch Betreff: [R] boxplot a list of objects Hi list, #Imagine we have vectors of different length (in practice 100 vectors):
2005 Jan 06
1
RSvgDevice incomplete svg output
Hi I use RSvgDevice to output plot, and modify them using svg editor (inkscape or sodipodi on Linux). Some month ago, results were perfect. I did exactly the same analysis today on the same data, and unfortunatly the results are different. While looking to the svg file, it seems that all information concerning "fill" and "stroke" of objects are lost. The consequence is that
2010 Dec 29
2
subset question
Hi, I'm having a problem with a step that should be pretty simple. I have a dataframe, d, with column names : gene s1 s2 s3. The column "gene" stores an Id; the rest of the columns store intensity data. I would like to extract the rows for gene Ids i1, i2, i3 ( I know a priori that those rows exist). So I do this: subset(d, gene %in% c(i1, i2, i3)). This does not give me the