similar to: nls factor

Displaying 20 results from an estimated 20000 matches similar to: "nls factor"

2006 Apr 20
2
nls and factor
Is it possible to include a factor in an nls formula? I've searched the help pages without any luck so I guess it is not feasible. I've given it a few attempts without luck getting the message: + not meaningful for factors in: Ops.factor(independ^EE, a) This is a toy example, my realworld case is much more complicated (and can not be solved linearizing an using lm)
2006 Jan 18
1
se.fit in predict.nls
The option se.fit in predict.nls is currently ignored. Is there any other function available to calculate the error in the predictions? Thanks, Manuel ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y m??viles desde 1 c??ntimo por minuto.
2010 Nov 08
1
try (nls stops unexpectedly because of chol2inv error
Hi, I am running simulations that does multiple comparisons to control. For each simulation, I need to model 7 nls functions. I loop over 7 to do the nls using try if try fails, I break out of that loop, and go to next simulation. I get warnings on nls failures, but the simulation continues to run, except when the internal call (internal to nls) of the chol2inv fails.
2012 Oct 15
2
fit a "threshold" function with nls
I am trying to model a dependent variable as a threshold function of my independent variable. What I mean is that I want to fit different intercepts to y following 2 breakpoints, but with fixed slopes. I am trying to do this with using ifelse statements in the nls function. Perhaps, this is not an appropriate approach. I have created a very simple example to illustrate what I am trying to do.
2007 Feb 13
1
nls: "missing value or an infinity" (Error in numericDeriv) and "singular gradient matrix"Error in nlsModel
Hi, I am a non-expert user of R. I am essaying the fit of two different functions to my data, but I receive two different error messages. I suppose I have two different problems here... But, of which nature? In the first instance I did try with some different starting values for the parameters, but without success. If anyone could suggest a sensible way to proceed to solve these I would be
2009 Mar 12
3
avoiding termination of nls given convergence failure
Hello. I have a script in which I repeatedly fit a nonlinear regression to a series of data sets using nls and the port algorithm from within a loop. The general structure of the loop is: for(i in 1:n){ … extract relevant vectors of dependent and independent variables … … estimate starting values for Amax and Q.LCP…
2006 Jan 08
1
confint/nls
I have found some "issues" (bugs?) with nls confidence intervals ... some with the relatively new "port" algorithm, others more general (but possibly in the "well, don't do that" category). I have corresponded some with Prof. Ripley about them, but I thought I would just report how far I've gotten in case anyone else has thoughts. (I'm finding the code
2007 Oct 10
11
please help me
dear list I am student M.S. statistics in department statistics . I am working in the function "nls" in the [R 2.3.1] with 246 data and want to fit the "exp" model to vectors( v and u ) but I have a problem to use it u 5.000000e-13 2.179057e+03 6.537171e+03 1.089529e+04 1.525340e+04 1.961151e+04 2.396963e+04 2.832774e+04 3.268586e+04 3.704397e+04 4.140209e+04
2009 Feb 19
2
bugfix for nls with port algorithm (PR#13540)
Full_Name: Manuel A. Morales Version: 2.8.1 OS: Linux Submission from: (NULL) (137.165.199.246) When fitting a model in nls using the algorithm port with constraints and the shorthand parameter[factor] in the model, I get the following error message: "Error in nls_port_fit(m, start, lower, upper, control, trace) : (list) object cannot be coerced to type 'double' In addition:
2005 Nov 21
4
Can't figure out warning message
Hi, I apologize for the previous posting, where the message was not formatted properly. Here is a better version: I have written the following function to check whether a vector has elements satisfying monotonicity. is.monotone <- function(vec, increase=T){ ans <- TRUE vec.nomis <- vec[!is.na(vec)] if (increase & any(diff(vec.nomis,1) < 0, na.rm=T)) ans <- FALSE
2012 Aug 23
1
NLS bi exponential Fit
Hi everyone, I'm trying to perform a bi exponential Fit with the package NLS. the plinear algorithm seems to be a good choice see: p<-3000 q<-1000 a<--0.03 b<--0.02 t<-seq(0:144);t y<-p*exp(a*t) + q*exp(b*t)+rnorm(t,sd=0.3*(p* exp(a*t) + q*exp(b*t))) fittA <- nls(y~cbind(exp(a*t), exp(b*t)), algorithm="plinear",start=list(a=-.1, b=-0.2), data=list(y=y, t=t),
2009 Jun 22
1
nls vs nlme: parameter constraints
Hello list, I'm trying to fit a model like beta[trt]/(1+alpha*x) where the data include some grouping factor. The problem is that the estimate for alpha is undefined for some of the treatments - any value greater than 20 is equally good and a step function would suffice. Ignoring the grouping structure, I can fit this using nls with the port algorithm by restricting the upper value of alpha
2010 Mar 11
4
help about solving two equations
I have two matrix s1 and s2, each of them is 1000*1. and I have two equations: digamma(p)-digamma(p+q)=s1, digamma(q)-digamma(p+q)=s2, and I want to sovle these two equations to get the value of x and y, which are also two 1000*1 matrices. I write a program like this: f <- function(x) { p<- x[1]; q <- x[2]; ((digamma(p)-digamma(p+q)-s1[2,]) )^2 +((digamma(q)-digamma(p+q)-s2[2,]) )^2
2011 Jun 24
4
How to capture console output in a numeric format
Hi, I would like to know how to capture the console output from running an algorithm for further analysis. I can capture this using capture.output() but that yields a character vector. I would like to extract the actual numeric values. Here is an example of what I am trying to do. fr <- function(x) { ## Rosenbrock Banana function on.exit(print(f)) x1 <- x[1] x2 <- x[2]
2008 Aug 27
5
Integrate a 1-variable function with 1 parameter (Jose L. Romero)
Hey fellas: I would like to integrate the following function: integrand <- function (x,t) { exp(-2*t)*(2*t)^x/(10*factorial(x)) } with respect to the t variable, from 0 to 10. The variable x here works as a parameter: I would like to integrate the said function for each value of x in 0,1,..,44. I have tried Vectorize to no avail. Thanks in advance, jose romero
2008 Nov 21
1
Discrepancy in the regression coefficients for Cox regression - PBC data set
Hi, When I run the following Cox proportional hazards model on the Mayo clinic's PBC data set (given in the "survival" package), the regression coefficients do not agree with the results presented in Table 4.6.3 (p. 195) of Fleming & Harrington's book. library(survival) data(pbc) ans.cox <- coxph(Surv(time, status) ~ log(bili) + log(alb) + age + log(protime) +
2010 Aug 31
1
Speeding up prediction of survival estimates when using `survifit'
Hi, I fit a Cox PH model to estimate the cause-specific hazards (in a competing risks setting). Then , I compute the survival estimates for all the individuals in my data set using the `survfit' function. I am currently playing with a data set that has about 6000 observations and 12 covariates. I am finding that the survfit function is very slow. Here is a simple simulation example
2011 Feb 18
2
How to flag those iterations which yield a warning?
Hi, I am running a simulation study with the survival::coxph. Some of the simulations result in problematic fits due to flat partial likelihood. So, you get the warning message: Warning message: In fitter(X, Y, strats, offset, init, control, weights = weights, ... : Loglik converged before variable 2 ; beta may be infinite. How can I keep track of the simulations which yield any kind of
2007 Aug 04
2
multiple nls - next fit even after convergence problem
Hello R-gurus, I'm trying to adjust different growth curves to a rather extensive dataset. I wrote up a function to go through all of them, but am encountering a problem : among the more than 1000 curves I have, obviously for some of them I encounter conversion problems. I'd like for my function to keep going to the next curve and store the fact that for curve number X I had a convergence
2009 Jul 02
2
constrained optimisation in R.
i want to estimate parameters with maximum likelihood method with contraints (contant numbers). for example sum(Ai)=0 and sum(Bi)=0 i have done it without the constraints but i realised that i have to use the contraints. Without constraints(just a part-not complete): skellamreg_LL=function(parameters,z,design) { n=length(z); mu=parameters[1]; H=parameters[2]; Apar=parameters[3:10];