similar to: Two Questions on R (call by reference and pre-compilation)

Displaying 20 results from an estimated 10000 matches similar to: "Two Questions on R (call by reference and pre-compilation)"

2004 Feb 24
5
Nonlinear Optimization
Hi, I have been brought back to the "R-Side" from MatLab. I have used R in graduate econometrics but only for statistics and regression (linear and nonlinear). But now I need to run general nonlinear optimization. I know about the add-in quadprog but my problem is not QP. My problem is a general nonlinear (obj funct) with linear constraints.I know about the "ms" and
2009 Feb 05
2
Non-linear optimisation
Hi there, I have a piece of Matlab code I use to optimise a trding strategy. If there are any Matlab/R specialists out there, I would appreciate your help in doing the exact same optimisation in R. I suspect I would use nlm() in R but am not sure where to define my constraints. I have attached my Matlab code below for reference. Many thanks. Constraints function [c,ceq]=TriskellConstraints(X)
2010 May 08
2
meaning of "<<-"
Hi, In my memory, "<<-" means assigning via a pointer or alias. But this is not officially defined in "R Language Definition". Could anybody help for the clarification? Thank you very much! Bests, Ruihong
2006 Dec 08
1
fmincon equivalent in R
Dear all R users, I am wondering if there are any function for Constraint optimization in R. Especially i am looking for a R - equivalent of "fmincon" function in MATLAB. Thanks and regards, Arun [[alternative HTML version deleted]]
2010 May 05
3
Latex and Stangle()
Hi, I'm using the Sweave and I would like include codes of the R in my LaTeX file. I extracts the R code with Stangle (), whose name is Relatorio.R but I can't include it in the Latex file as an appendix. Suggests? Thanks, -------------------------------------- Silvano Cesar da Costa Departamento de Estat?stica Universidade Estadual de Londrina Fone: 3371-4346
2006 Nov 26
2
Quadratic Optimization
Hi, I need to solve an optimization problem in R having linear objective function and quadratic constraints(number of variables is around 80). What are the possible choices to do this in R. optim() function only allows box constrained problems. Is it possible in nlm()? Or please tell me if there is any other routine. Thanks Amit
2010 May 05
0
R-help Digest, Vol 87, Issue 5
Unsubscribe -----Original Message----- From: r-help-request at r-project.org Date: Wed, 05 May 2010 12:00:09 To: <r-help at r-project.org> Subject: R-help Digest, Vol 87, Issue 5 Send R-help mailing list submissions to r-help at r-project.org To subscribe or unsubscribe via the World Wide Web, visit https://stat.ethz.ch/mailman/listinfo/r-help or, via email, send a message with subject
2003 Jun 26
0
nonlinear constraint optimization function in R?
Dear all, I am looking for a R-function that performs nonlinear constraint optimization (where the objective function and the constraints are allowed to be nonlinear). More specifically, I am trying to figure out whether there is an equivalent function of NAG fortran library' "E04UCF" or matlab's "fmincon" in R. Any help is greatly appreciated. Thank you, Sunduz
2005 Dec 06
7
R is GNU S, not C.... [was "how to get or store ....."]
======= 2005-12-06 22:16:17 伳侜佋佢伬伌佇伵佒佇佇伌伒伬仯伜======= >Martin Maechler a 侀crit : > >> please, please, these trailing ";" are *so* ugly. >> This is GNU S, not C (or matlab) ! >> >> but I'll be happy already if you could >> drop these ugly empty statements at the end of your lines... > >May I disagree ? >I find missing ";" at
2011 Oct 01
7
Poor performance of "Optim"
I used to consider using R and "Optim" to replace my commercial packages: Gauss and Matlab. But it turns out that "Optim" does not converge completely. The same data for Gauss and Matlab are converged very well. I see that there are too many packages based on "optim" and really doubt if they can be trusted! -- View this message in context:
2007 May 19
2
What's wrong with my code ?
I try to code the ULS factor analysis descrbied in ftp://ftp.spss.com/pub/spss/statistics/spss/algorithms/ factor.pdf # see PP5-6 factanal.fit.uls <- function(cmat, factors, start=NULL, lower = 0.005, control = NULL, ...) { FAfn <- function(Psi, S, q) { Sstar <- S - diag(Psi) E <- eigen(Sstar, symmetric = TRUE, only.values = TRUE) e <- E$values[-(1:q)] e <-
2007 Sep 07
2
Matlab's lsqnonlin
Hi! I'm translating some code from Matlab to R and I found a problem. I need to translate Matlab's function 'lsqnonlin' (http://www-ccs.ucsd.edu/matlab/toolbox/optim/lsqnonlin.html) into R, and at the beginning I thought it would be the same as R's 'optim'. But then I looked at the definition of 'lsqnonlin' and I don't quite see how to make
2006 Jun 12
1
r's optim vs. matlab's fminsearch
Hi, I'm having a problem converting a Matlab program into R. The R code works almost all the time, but about 4% of the time R's optim function gets stuck on a local minimum whereas matlab's fminsearch function does not (or at least fminsearch finds a better minimum than optim). My understanding is that both functions default to Nelder-Mead optimization, but what's different about
2009 Nov 30
3
Question about output from optim
Dear R-users, I am trying to port to R something that I wrote in Matlab to perform model parameter optimization using the Nelder-Mead simplex method (fminsearch). I read the help on ?optim (which seems to be the way to go) as well as a bunch of posts on the topic, but I would like to make sure about something before I spend to much time trying to reproduce something that is not possible. The
2006 Feb 06
3
iteration history
Dear R Users I would like to use optim function to optimize a function. I read help but I couldn't find what I need: is it possible to get information after each iteration, for example as there is in MATLAB: Gradient's Iteration Func-count f(x) Step-size infinity-norm 0 24 388.976
2010 Jan 04
2
MLE optimization
Folks, I'm kind of newbie in R, but with some background in Matlab and VBA programming. Last month I was implementing a Maximum Likelihood Estimation in Matlab, but the algorithms didn't converge. So my academic advisor suggested using R. My problem is: estimate a mean reverting jump diffusion parameters. I've succeeded in deriving the likelihood function (which looks like a gaussian
2010 Mar 04
2
Hi
How Can I write this this matlab code in R: options=optimset('TolFun',1e-9,'TolX',1e-9,'MaxIter',1e8,'MaxFunEvals',1e8); c=c/2; [alpha, delta, epsilon, nofcup] = ustrs(set_date,mat_date); y = fminsearch('pbond',.15,options,p,c,nofcup,delta/epsilon); y = 200*y; Note pbond is a function in Matlab I already wrote in R ustrs is a function in Matlab I
2011 Feb 07
2
fast optimization routines in R
Dear R help archive group, I am looking for a maximization routine that I can use to maximize a large variety of relatively complex likelihoods. I undertand (from previous posts) that coding the objective function more efficiently can help. However, the optimization routine employed seems important too. So far, I have tried the optimization routines optim, maxlik, trust and nlminb. The latter two
2005 Jun 08
2
Converting code from MATLAB to R
Hi, I'm having trouble converting code from MATLAB to R; I want to find the equivalence to MATLAB's function 'fsolve'. I've tried 'nlm', on the squared argument, in R but i did not get the same results. Thankful if helped. Best regards, Martin Englund ------------------------------------------------------------------------------ This e-mail and any attachment may
2009 Jun 03
3
Return variable assignments from a function
I'd like to perform return variable assignments like matlab. For example, the following function would return A, B, and c to the script that called it. ================================= function [A,B,c] = simple(m,n) A=[ 3 2; 3 3] B=m c=1:n ================================= I'd like to do similar assignments in R, but I seem to be able to only return one variable. I tried to use a