similar to: Detecting typo in function argument

Displaying 20 results from an estimated 400 matches similar to: "Detecting typo in function argument"

2010 Sep 17
0
question on OPTIMX with installing and using
Dear R users I have tried to install the optimx but met problems. I have gone to the website you suggested: https://r-forge.r-project.org/R/?group_id=395 and tried to install it with the following method: install.packages("optimx", repos="http://R-Forge.R-project.org") I have received the following information: package 'numDeriv' successfully unpacked and MD5
2010 Dec 15
3
Applying function to a TABLE and also "apply, tapply, sapply etc"
Dear R-help forum members, Suppose I have a data-frame having two variables and single data for each of them, as described below. variable_1           variable_2         10                          20 I have written a function, say, 'fun' which uses input 10 and 20 and gives me desired result. fun = function(X, Y)          {          X + Y              #( I am just giving an example of
2005 Aug 13
1
Problem with numeric variable
Hello all, I posted a question some days ago without getting any answers, perhaps, as one of you kindly pointed out, because the question was not clearly stated. Let me reformulate it: In a frame, a column named C2 represents a numeric variable (checked with is.numeric(C2)). Some rows in the frame have an undefined value for C2, represented in the table by a ? sign. The remaining rows have
2005 Aug 10
1
Problems with numeric variable containing ? values
Hello, I have a problem with the values for one column in a table. The variable represented in this column is numeric (I get TRUE when I ask is.numeric(x)). However, the values are listed ordinally and with row numbers as values, not with the ones that appear in the table. Some rows have an undefined value for this column, which appears as ? in the table (this is not an error). I wonder whether
2011 Aug 29
3
gradient function in OPTIMX
Dear R users When I use OPTIM with BFGS, I've got a significant result without an error message. However, when I use OPTIMX with BFGS( or spg), I've got the following an error message. ---------------------------------------------------------------------------------------------------- > optimx(par=theta0, fn=obj.fy, gr=gr.fy, method="BFGS", >
2011 Aug 13
3
optimization problems
Dear R users I am trying to use OPTIMX(OPTIM) for nonlinear optimization. There is no error in my code but the results are so weird (see below). When I ran via OPTIM, the results are that Initial values are that theta0 = 0.6 1.6 0.6 1.6 0.7. (In fact true vales are 0.5,1.0,0.8,1.2, 0.6.) -------------------------------------------------------------------------------------------- >
2011 Sep 10
1
control list gotcha
This is mainly a reminder to others developing R packages to be careful not to supply control list items that are not used by the called package. Optimx is a wrapper package that aims to provide a common syntax to a number of existing optimization packages. Recently in extending optimx package I inadvertently introduced a new control for optimx which is NOT in any of the wrapped optimization
2017 Dec 31
1
Order of methods for optimx
Dear R-er, For a non-linear optimisation, I used optim() with BFGS method but it stopped regularly before to reach a true mimimum. It was not a problem with limit of iterations, just a local minimum. I was able sometimes to reach better minimum using several rounds of optim(). Then I moved to optimx() to do the different optim rounds automatically using "Nelder-Mead" and
2012 May 08
1
optim question
Hello, I used optim to find the MLE estimates of some parameters. See the code below. It works for data1(x). but It did not work for data2 and the error says" L-BFGS-B needs finite values of 'fn' ". data2: c(x, 32) that is, if I added the number 32 at the end of data1. The error appears "non-finite function value" etc. Any comments or suggestions? Thanks!
2016 Oct 09
1
optim(?, method=?L-BFGS-B?) stops with an error
I'll not copy all the previous material on this thread to avoid overload. The summary is that all the methods Spencer has tried have some issues. The bad news: This is not uncommon with optimization methods, in part because the problems are "hard", in part because getting them implemented and linked to an interfacing approach like R is very tedious and prone to omissions and
2019 Jan 31
1
nlminb with constraints failing on some platforms
Prof Nash, Prof Galanos Is it possible to use a generic code stub in front of packages that use optimx to improve optimx use or curtail it according to the requirements? Best Regards Amit +91 7899381263 ________________________________________________________________________ Please request Skype as available 5th Year FPM (Ph.D.) in Finance and Accounting Area Indian Institute
2011 Nov 02
1
overly long lines in pdf output of manual from package
In re-factoring my optimx package, I'm finding that the pdf output has some lines that are outside the margins (and there are warnings in R CMD check optimx). Clearly I can fix this by editing the tex file that is generated, but the build infrastructure would still get things wrong in automatic processing. So that gives rise to 3 questions: 1) How do I adjust the DESCRIPTION file to avoid too
2005 Jul 15
2
pdf() black&white; panel titles in lattice
Hello, I have two questions: 1. How can I get black and white graphics using the pdf() device? I have tried pdf(Name.pdf, bg="white", fg"black"), but I still get full-color graphics. 2. When using lattice, how do I change the title for each panel? By default it uses the categories of the grouping factor. I would like to modify the labels in the graphic without changing
2010 Jun 22
1
Subject: Re ZINB by Newton Raphson??
I have not included the previous postings because they came out very strangely on my mail reader. However, the question concerned the choice of minimizer for the zeroinfl() function, which apparently allows any of the current 6 methods of optim() for this purpose. The original poster wanted to use Newton-Raphson. Newton-Raphson (or just Newton for simplicity) is commonly thought to be the
2011 Feb 06
1
function optimization
Dear all, this is my first time, and just begin to use R. But I've a question about optimization using optimx library. It could sound stupid by I'm a bit affraid with the problem, because anything I try, anything Error. The procedure was: optimx(par="10,71,1",fn=(Prey*Provisioning)/Risk, control=list("maximize)) well the problem lies in the initial value parameters, again
2011 Jul 23
1
Extend my code to run several data at once.
Hi I have a code that calculate maximisation using optimx and it is working just fine. I want to extend the code to run several colomns of R_j where j runs from 1 to 200. If I am to run the code in its current state, it means I will have to run it 200 times manually. May you help me adjust it to accomodate several rows of R_j and print the 200 results. ***Please do not get intimidated by the
2015 Apr 24
2
Title case in DESCRIPTION for package where a word is a function name
I was preparing a fix for a minor glitch in my optimx package and R CMD check gave an error that the title was not in title case. It is A Replacement and Extension of the optim() Function R CMD check suggests the incorrect form A Replacement and Extension of the Optim() Function 'Writing R Extensions' suggests single quotes, i.e., A Replacement and Extension of the 'optim()'
2011 Nov 29
2
Parameters setting in functions optimization
Good afternoon everybody, I'm quite new in functions optimization on R and, whereas I've read lot's of function descriptions, I'm not sure of the correct settings for function like "optimx" and "nlminb". I'd like to minimize my parameters and the loglikelihood result of the function. My parameters are a mean distance of dispersion and a proportion of
2011 Sep 02
5
Hessian Matrix Issue
Dear All, I am running a simulation to obtain coverage probability of Wald type confidence intervals for my parameter d in a function of two parameters (mu,d). I am optimizing it using "optim" method "L-BFGS-B" to obtain MLE. As, I want to invert the Hessian matrix to get Standard errors of the two parameter estimates. However, my Hessian matrix at times becomes
2000 Sep 24
2
Folding ?
Hi, I need to write a function that would look something like this: S <- function(b=betas){ expression(b[1] * f(b[2] * x * f(b[3] * x * f(...b[n-1] * x * f(b[n] * x)))...) } Where n is the number of element in b. Further I need to be able to evaluate S at some x numerically of course and I need to use "deriv" and produce dS/dx such that I can evaluate it also at some x. I