similar to: optim or nlminb for minimization, which to believe?

Displaying 20 results from an estimated 120 matches similar to: "optim or nlminb for minimization, which to believe?"

2010 Sep 29
1
nlminb and optim
I am using both nlminb and optim to get MLEs from a likelihood function I have developed. AFAIK, the model I has not been previously used in this way and so I am struggling a bit to unit test my code since I don't have another data set to compare this kind of estimation to. The likelihood I have is (in tex below) \begin{equation} \label{eqn:marginal} L(\beta) = \prod_{s=1}^N \int
2011 Sep 02
1
Using capture.output within a function
Dear R-users I'm running a maximum likelihood procedure using the spg package. I'd like to save some output produced in each iteration to a file, but if I put the capture.output() within the function I get the following message; Error in spg(par = startval, fn = loglik, gr = NULL, method = 3, lower = lo, : Failure in initial function evaluation!Error in -fn(par, ...) : invalid argument
2008 Feb 24
0
problem with ML estimation
dear list, as a part my problem. I have to estimate some parameters using ML estimation. The form of the likelihood function is not straight forward and I had to use a for loop to define the function. I used "optim" to maximise the result but was not sure of the programme. To validate my results, I tried to write a function to obtain the MLE of a bivariate normal in the same manner. On
2011 Apr 13
0
ddply and nlminb
Hello I'm new to R (one week) so please excuse any obvious mistakes in my code or posting. I am attempting to fit a non linear function defining the relationship between dependent variable A and the variables PAR and T grouped by the condition Di. The following steps are taken in the Rcode below: 1) load the data (not shown) 2) define the function to be fit 3) define the starting values
2012 Dec 10
3
[LLVMdev] [PATCH] Teaching ScalarEvolution to handle IV=add(zext(trunc(IV)), Step)
Hello all, I wanted to get some feedback on this patch for ScalarEvolution. It addresses a performance problem I am seeing for simple benchmark. Starting with this C code: 01: signed char foo(void) 02: { 03: const int count = 8000; 04: signed char result = 0; 05: int j; 06: 07: for (j = 0; j < count; ++j) { 08: result += (result_t)(3); 09: } 10: 11: return result; 12: } I
2005 Sep 26
2
nls and na/Nan/Inf error
I am trying to it a particular nonlinear model common in Soil Science to moisture release data from soil. I have written the function as shown below according to the logist example in Ch8 of Pinheiro & Bates. I am getting the following error (R version 2.1.1) *Error in qr(attr(rhs, "gradient")) : NA/NaN/Inf in foreign function call (arg 1)* Below is the function and data. /#
2011 Dec 11
1
nls start values
I'm using nls to fit periodic gene-expression data to sine waves. I need to set the upper and lower boundaries, because I do not want any negative phase and amplitude solutions. This means that I have to use the "port" algorithm. The problem is, that depending on what start value I choose for phase, the fit works for some cases, but not for others. In the example below, the fit works
2010 Apr 11
0
[LLVMdev] Proposal: stack/context switching within a thread
On Sun, Apr 11, 2010 at 4:09 PM, Jeffrey Yasskin <jyasskin at google.com> wrote: > Kenneth Uildriks <kennethuil at gmail.com> wrote: >> As I see it, the context switching mechanism itself needs to know >> where to point the stack register when switching.  The C routines take >> an initial stack pointer when creating the context, and keep track of >> it from
2010 Apr 11
3
[LLVMdev] Proposal: stack/context switching within a thread
Kenneth Uildriks <kennethuil at gmail.com> wrote: > As I see it, the context switching mechanism itself needs to know > where to point the stack register when switching.  The C routines take > an initial stack pointer when creating the context, and keep track of > it from there.  If we don't actually need to interoperate with > contexts created from the C routines, we have
2008 Apr 25
5
Non-linear system of equations
Hello R users, I am trying to estimate the parameters of a bimodal normal distribution using moments matching, so I have to solve a non-linear system of equations. How can I solve the following simple example? x^2 - y^2 = 6 x ? y = 3 I heard about nlsystemfit, but I don?t know how to run it exactly. I have tried the following code, but it doesn?t really work: f1 <-y~ x[1]^2-x[2]^2-6 f2
2012 Dec 11
1
Debian packaging and openblas related crash when profiling in R
Hello R-sig-debian and (hopefully) Dirk: On Debian wheezy, I have the R packaging that CRAN (you) provide. I run into a little trouble while trying to fiddle with alternative BLAS. I know you and I went around on this last year and I think perhaps I've found something wrong in the framework, or I've just done something wrong. I installed the packages openblas-base and openblas-dev, and
2002 Mar 29
1
help with lme function
Hi all, I have some difficulties with the lme function and so this is my problem. Supoose i have the following model y_(ijk)=beta_j + e_i + epsilon_(ijk) where beta_j are fixed effects, e_i is a random effect and epsilon_(ijk) is the error. If i want to estimate a such model, i execute >lme(y~vec.J , random~1 |vec .I ) where y is the vector of my data, vec.J is a factor object
2018 May 10
2
LLVM SCEV isAddRecNeverPoison and strength reduction
+CC llvm-dev On Tue, May 8, 2018 at 2:34 AM, Gal Zohar <Gal.Zohar at ceva-dsp.com> wrote: > I noticed that SCEV, when trying to perform strength reduction, doesn’t use > the ability to prove an induction variable does not signed/unsigned wrap due > to infinite loops. > > Is there an easy way to use the isAddRecNeverPoison function when > determining if strength reduction
2006 Mar 27
2
Clustering question \ dist(datmat)
Hello everybody. I am trying to cluster circular data (data points which are angles), thus i can not use the "dist" function in "mclust" to generate my distance matrix, I am using the function " Dij = 0.5*( 1 - cos(theta_i - theta_j)). The thing is "hclust" will not accept this distance matrix, i tried to put it in a data frame, but again i get an error message
2005 Dec 14
2
suggestions for nls error: false convergence
Hi, I'm trying to fit some data using a logistic function defined as y ~ a * (1+m*exp(-x/tau)) / (1+n*exp(-x/tau) My data is below: x <- 1:100 y <- c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,1,1,1,2,2,2,2,2,3,4,4,4,5, 5,5,5,6,6,6,6,6,8,8,9,9,10,13,14,16,19,21, 24,28,33,40,42,44,50,54,69,70,93,96,110,127,127,141,157,169,
2006 Mar 01
2
inconsistency between anova() and summary() of glmmPQL
Dear All, Could anyone explain me how it is possible that one factor in a glmmPQL model is non-significant according to the anova() function, whereas it turns out to be significant (or at least some of its levels differ significantly from some other levels) according to the summary() function. What is the truth, which results shall I believe? And, is there any other way of testing for the
2011 Mar 10
2
R beginner - Error in as.vector(x, mode)
Hi everyone, I am new to R and keep getting the message Error in as.vector(x, mode) while trying to run nlsystemfit. Below is my exact code. The data is in Stata format because I only recently swapped to R and am trying to compare results from Stata to make sure I know what is going on. I have searched google and read sever R-help articles with this error. They all say the problem is to do
2007 Jun 07
1
MITOOLS: Error in eval(expr, envir, enclos) : invalid 'envir' argument
R-users & helpers: I am using Amelia, mitools and cmprsk to fit cumulative incidence curves to multiply imputed datasets. The error message that I get "Error in eval(expr, envir, enclos) : invalid 'envir' argument" occurs when I try to fit models to the 50 imputed datasets using the "with.imputationList" function of mitools. The problem seems to occur
2002 Feb 20
2
How to get the penalized log likelihood from smooth.spline()?
I use smooth.spline(x, y) in package modreg and I would like to get value of penalized log likelihood and preferable also its two parts. To make clear what I am asking for (and make sure that I am asking for the right thing) I clarify my problem trying to use the same notation as in help(smooth.spline): I want to find the natural cubic spline f(x) such that L(f) = \sum_{k=1}{n} w[k](y[k] -
2007 Jan 20
1
aov y lme
Dear R user, I am trying to reproduce the results in Montgomery D.C (2001, chap 13, example 13-1). Briefly, there are three suppliers, four batches nested within suppliers and three determinations of purity (response variable) on each batch. It is a two stage nested design, where suppliers are fixed and batches are random. y_ijk=mu+tau_i+beta_j(nested in tau_i)+epsilon_ijk Here are the