search for: swts

Displaying 8 results from an estimated 8 matches for "swts".

Did you mean: sets
2010 Mar 08
2
fit a gamma pdf using Residual Sum-of-Squares
...17, 26, 60, 94, 128, 137, 128, 77, 68, 65, 60, 51, 26, 17, 9, 5, 2, 3, 7, 3) I have typed the following code, using nls method: fit <- nls(y ~ (1/((s^a)*gamma(a))*x^(a-1)*exp(-x/s)), start = c(s=3, a=75, x=86)) But I have the following message error (sorry, this is in German): Fehler in qr(.swts * attr(rhs, "gradient")) : Dimensionen [Produkt 3] passen nicht zur Länge des Objektes [23] Zusätzlich: Warnmeldung: In .swts * attr(rhs, "gradient") : Länge des längeren Objektes ist kein Vielfaches der Länge des kürzeren Objektes Could anyone help me with the code? I wou...
2007 Nov 30
2
nls and discontinuous functions
...ow is a simple example: f <- function (t,k,l,u) { r0<-346.1 x<-t-l if (x<0) r0 else (r0-u)*exp(-k*x)+u }prof1<-read.table("c:\\data.txt", header=TRUE)results<-nls(y1~f1(t,k,l,u), data=prof1, start=list(k=0.05, l=4, u=154)) Errors I am getting are: Error in qr(.swts * attr(rhs, "gradient")) : dims [product 3] do not match the length of object [10]In addition: Warning messages:1: In if (x < 0) r0 else (r0 - u) * exp(-k * x) + u : the condition has length > 1 and only the first element will be used2: In if (x < 0) r0 else (r0 - u) * exp(-k...
2008 May 07
3
function in nls argument
...d E as to minimize the function output with the following: optim.model<-nls(nulldat ~ optim.fun(ST04, SM08b, ch2no, a, b, d, E), data=tower, start=list(a=-0.003,b=0.13,d=0.50, E=400), na.action = na.exclude ) were nulldat=0 At this point I get the following error message: Error in qr.default(.swts * attr(rhs, "gradient")) : NA/NaN/Inf in foreign function call (arg 1) Warning messages: 1: In if (na.rm) x <- x[!is.na(x)] else if (any(is.na(x))) stop("missing values and NaN's not allowed if 'na.rm' is FALSE") ... : the condition has length > 1 and only...
2011 Sep 19
0
nls picewise FvCB model
...-exp(19.02-38.83/(R*(Tleaf+273.15))) ? ?O <-210 ? ?ge<-min( ?(Vcmax*(Ci-Gstar))/(Ci+(Kc*(1+(O/Ko)))) ,(J*(Ci-Gstar))/((4*Ci)+(8*Gstar)) ?) -Rd ? ?ge ? ?} m<- nls(A ~ rhs(Ci, Vcmax, J, Rd), data=GE, start = list(Vcmax=50, J=150, Rd=4), trace = T) And get the following error: Error in qr(.swts * attr(rhs, "gradient")) : ?dims [product 3] do not match the length of object [10] In addition: Warning messages: 1: In min(x) : no non-missing arguments to min; returning Inf 2: In max(x) : no non-missing arguments to max; returning -Inf 3: In .swts * attr(rhs, "gradient") : ?...
2009 Sep 04
1
How should a SelfStart function handle illegal parameter values?
...om nls [e.g. nls(y~SSmodel(x, pars...), ...)] those non-values lead to errors such as (but not limited to): Error in numericDeriv(form[[3L]], names(ind), env) : Missing value or an infinity produced when evaluating the model or (if I provide a gradient attribute) Error in qr.default(.swts * attr(rhs, "gradient")) : NA/NaN/Inf in foreign function call (arg 1) I can't see a way of making nls either stick to legal parameter values, or accept NA/NaN/Inf as indicating "bad" parameter values. I really do want to use nls rather than a bounded optimisation t...
2012 Jan 25
1
solving nls
...#39;, 'm'), # parameter names + function(lN0, k, t, m){} # arguments for result + ) > regresjon2<-nls(lcfu~model(lN0, k, t, m), data=cfu_data, start=(list(lN0 = > 7.6, k = -0.08, m = 2)), control=nls.control(maxiter=50000, > minFactor=1/1000000000000000000)) Error in qr.default(.swts * attr(rhs, "gradient")) : NA/NaN/Inf in foreign function call (arg 1) I have many datasets, but here is one as an example: t lcfu 0 7.344108507 1.0625 7.166004379 1.958333333 7.317609443 3.722222222 7.099456839 6.847222222 7.009846065 16.95833333 6.7143479 28.90625 6.086498408 37...
2009 Sep 21
1
How to use nls when [selfStart] function returns NA or Inf??
...om nls [e.g. nls(y~SSmodel(x, pars...), ...)] those non-values lead to errors such as (but not limited to): Error in numericDeriv(form[[3L]], names(ind), env) : Missing value or an infinity produced when evaluating the model or (if I provide a gradient attribute) Error in qr.default(.swts * attr(rhs, "gradient")) : NA/NaN/Inf in foreign function call (arg 1) A toy example demonstrating my problem (legal values of param are >1): #----------- SSexample<-selfStart( model=function(x, param) x^log(param-1), initial = function(mCall, data, LHS){ val<- 1.001...
2012 Oct 11
1
nls NAs
...new space such that warmnoNA<-warming$T10cm!="NA") but with no success. With the original code above, get the following error: Error in numericDeriv(form[[3L]], names(ind), env) : Missing value or an infinity produced when evaluating the model In addition: Warning message: In .swts * (lhs - rhs) : longer object length is not a multiple of shorter object length Any ideas? Thanks, Elizabeth -- View this message in context: http://r.789695.n4.nabble.com/nls-NAs-tp4645935.html Sent from the R help mailing list archive at Nabble.com.