similar to: Profile on optim/nlm

Displaying 20 results from an estimated 9000 matches similar to: "Profile on optim/nlm"

2002 Jul 04
4
Script file editors for Windows - submit highlighted text?
Greetings, I use S+, Stata, SAS and R depending on the weather... The script file editors in S+, SAS and Stata all allow me to submit a portion of a developing script file to the running process. In R I have to use an external editor and either source the entire file or do lots of copy-and-pasting. Are there any editors out there which interface to R more closely and let me submit a section
2004 Oct 12
2
constrained optimization using nlm/optim?
I'm looking for an example of a simple R script that impliments a contrained nonlinear function using nlm or optim. I'm not exactly sure how to impliment the constraints within the objective function that is passed to nlm/optim. obj.func <- function( p ) { x(p) <- unconstrained obj function value if( constraint1 > something ) { obj.func <- x(p) } else {
2002 Jul 31
2
Bug in legend?
This is a bit obscure but caused me some grief... R1.5.1/MS Windows There seems to be a peculiarity in legend associated with the use of expression text. It seems as if expression text is used in (eg) an mtext call then if the call to legend also includes expression text and a subscript then the legend box and line spacing depends on the value of cex used in the previous call to mtext,
2010 Oct 22
2
Error message in using nlm() and optim()
I am facing a problem when trying to maximize the likelihood function. I am actually estimating a dynamic switching regression model using simulated likelihood approach. The likelihood function is estimated using Simulations and is extremely complex. It comprises of 16 parameters ,q1, q2, q3,.......q16. While attempting to maximize the likelihood function, using the functions nlm() and optim(),
2010 Feb 02
1
how to use optim() or nlm() to solve three nonlinear equations
Dear all, I just know how to solve an eaquation by using optim() or nlm(). But, now, I have three nonlinear equations, how could we use optim() or nlm() to solve  a system of nonlinear equations in R?  Thank you so much. Sincerely, Joe ___________________________________________________ 您的生活即時通 - 溝通、娛樂、生活、工作一次搞定! [[alternative HTML version deleted]]
2007 Apr 10
1
nlm() and optim()
Dear R-users, I have just joint the list and much appreciate any thoughts on 2 issues. Firstly, I want to reproduce some minimization results conducted in MATLAB. I have suceeded with nlm and optim-method CG. I have been told that I should get also with other optim methods. Actually, I found the same results when testing a very straightforward equation. However with a more complicated model it
2005 May 12
3
R2.1.0: Bug in list.files
R2.0.1 (MS Windows) > list.files(myloc,"*.zip",full=T) [1] "P:/SARsoftware/Rlibraries/gnlm_0.1.zip" [2] "P:/SARsoftware/Rlibraries/lms2_0.2.zip" R2.1.0: > list.files(myloc,"*.zip",full=T) Error in list.files(path, pattern, all.files, full.names, recursive) : invalid 'pattern' regular expression Bug? or have I missed something
2010 Jul 08
2
Using nlm or optim
Hello, I am trying to use nlm to estimate the parameters that minimize the following function: Predict<-function(M,c,z){ + v = c*M^z + return(v) + } M is a variable and c and z are parameters to be estimated. I then write the negative loglikelihood function assuming normal errors: nll<-function(M,V,c,z,s){ n<-length(Mean) logl<- -.5*n*log(2*pi) -.5*n*log(s) -
2004 Jun 10
3
Help with plotmath
There must be a simple answer. I want to plot an expression, where the expression is held in a string variable. The "obvious" solution along the lines of ex<-"x^2" plot( c(0,1), c(0,1), main=as.expression(ex) ) gives me the a title x^2 - ie doesn't treat it like an expression. I suspect I don't understand expressions properly. For the real problem I do need to
2002 Apr 26
1
optim or nlm with matrices
Hi, I have the following hypothetical optimization problem: -det(t(x-A%*%x1)%*%(x-A%*%x1)) where A,x,x1 are matrices. A coefficients and x and x1 are variable matrices or vectors. I tried to apply optim and nlm functions but I kept receive the following massage: Error in A%*%x1 : non-conformable arguments. The massage appears even the -det() can be calculated and the dimensions are checked. here
2005 Oct 11
2
Sometimes having problems finding a minimum using optim(), optimize(), and nlm() (while searching for noncentral F parameters)
Hi everyone. I have a problem that I have been unable to determine either the best way to proceed and why the methods I'm trying to use sometimes fail. I'm using the pf() function in an optimization function to find a noncentrality parameter that leads to a specific value at a specified quantile. My goal is to have a general function that returns the noncentrality parameter that
2008 Aug 05
1
optimize simultaneously two binomials inequalities using nlm( ) or optim( )
Dear R users, I?m trying to optimize simultaneously two binomials inequalities (used in acceptance sampling) which are nonlinear solution, so there is no simple direct solution. Please, let me explain shortly the the problem and the question as following. The objective is to obtain the smallest value of 'n' (sample size) satisfying both inequalities: (1-alpha) <= pbinom(c, n, p1)
2003 Mar 18
2
Strange and disturbing bug
How about this one? If I set a variable in a data.frame with a two- part name including a dot (say y.pair), and if the variable with the name of the first part (y) doesn't but I ask for it's value I get the value of the two-part name. Ie set fred$x.pair and print the value of fred$x it gives me the value I set to fred$x.pair. Weird and somewhat disturbing! Maybe an example makes it
2003 Sep 30
1
can't get names from vector in nlm calls
I've been trying to figure out how to get the names of the parameter vector variables when inside the function that nlm calls to return the objective function value: knls <- function( theta, eqns, data, fitmethod="OLS", instr=NULL, S=NULL ) { ## print( names( theta ) ) # returns NULL ## get the values of the parameters for( i in 1:length( theta ) )
2006 Sep 26
1
warning message in nlm
Dear R-users, I am trying to find the MLEs for a loglikelihood function (loglikcs39) and tried using both optim and nlm. fredcs39<-function(b1,b2,x){return(exp(b1+b2*x))} loglikcs39<-function(theta,len){ sum(mcs39[1:len]*fredcs39(theta[1],theta[2],c(8:(7+len))) - pcs39[1:len] * log(fredcs39(theta[1],theta[2],c(8:(7+len))))) } theta.start<-c(0.1,0.1) 1. The output from using optim is
2003 Oct 06
1
getting names of p vector in nlm function...
Dear R programming folks: I'm trying to finish off a package for non-linear simultaneous system estimation and I've been trying to figure out how to get the names of the parameter vector variables when inside the function that nlm calls to return the objective function value: knls <- function( theta, eqns, data, fitmethod="OLS", instr=NULL, S=NULL ) { ## print(
2003 Jul 08
2
specifying multiple parameter starting values in nlm
Hi there I am having trouble figuring out how to get an nlm function to report estimates for two parameter values in an estimation. The way I've got it goes something like this: f <- function (q, r) { here, I have a second loop which uses q, r to give me values for c, d below. a and b are already specified; this loop is a mass-balance function where I am trying to find values of q,
2010 Jun 15
1
Error in nlm : non-finite value supplied by 'nlm'
Hello, I am trying to compute MLE for non-Gaussian AR(1). The error term follows a difference poisson distribution. This distribution has one parameter (vector[2]). So in total I want to estimate two parameters: the AR(1) paramter (vector[1]) and the distribution parameter. My function is the negative loglikelihood derived from a mixing operator. f=function(vector)
2004 Feb 11
3
RGui (Windows) crashes after use of a Salford Fortran DLL
Anybody out there successfully using the Salford Fortran compilers with R? I have created a DLL using the Salford FTN95 compiler and it works in as far I can dyn.load it, run the routines and get the right answers back. Unfortunately subsequently, sometime later, the Rgui crashes (access violation I think from the DrWatson log). The crashes depend on whether or not I paste the code as one
2008 Jun 11
1
difference between nlm and nlminb
Hi, I was wondering if someone could give a brief, big picture overview of the difference between the two optimization functions nlm and nlminb. I'm not familiar with PORT routines, so I was hoping someone could give an explanation. Thanks, Angelo _________________________________________________________________ Instantly invite friends from Facebook and other social networks to join yo