similar to: Likelihood returning inf values to optim(L-BFGS-B) other options?

Displaying 20 results from an estimated 1100 matches similar to: "Likelihood returning inf values to optim(L-BFGS-B) other options?"

2009 Aug 12
1
calling a function with dynamically generated buttons
Hallo, I'm dynamically generating buttons depending on the number of rows of my dataframe. Every button is supposed to call a function which generates a plot with the values of one of my dataframe rows. My code looks like this: base <- tktoplevel() plotten <- function(mat, namen, titel) { midpts <- barplot(height=mat, names.arg = namen, main = titel, las=2)
2007 Jul 13
2
nearest correlation to polychoric
Dear all, Has someone implemented in R (or any other language) Knol DL, ten Berge JMF. Least-squares approximation of an improper correlation matrix by a proper one. Psychometrika, 1989, 54, 53-61. or any other similar algorithm? Best regards Jens Oehlschl?gel Background: I want to factanal() matrices of polychoric correlations which have negative eigenvalue. I coded Highham 2002
2004 Sep 16
1
Newbie q. need some help understanding this code.
dear all. Would someone be kind and willing to explain the code below for a person who has never used R? ( that is if one has enough time and inclination) It implements gillepsie's stochastic algorithm for Lotka Volterra model. What would help me tremendously is to see the breakdown of the line by line code into plain english. thanks for any insights or other comments. sean
2008 Jul 09
0
problems using mice()
R 2.7.2 PPC Mac OS X 10.4.11 library mice 1.13.1 I try to use mice for multivariate data imputation. My variables are numeric, factors, count data, ordered factors. First I created a vector for the methods to use with each variable ImpMethMice<-c(rep("logreg", 62), rep("polyreg",1), rep("norm",12), rep("polyreg",12)) next step was
2011 Jul 26
1
nls - can't get published AICc and parameters
Hi I'm trying to replicate Smith et al.'s (http://www.sciencemag.org/content/330/6008/1216.abstract) findings by fitting their Gompertz and logistic models to their data (given in their supplement). I'm doing this as I want to then apply the equations to my own data. Try as a might, I can't quite replicate them. Any thoughts why are much appreciated. I've tried contacting the
2007 Apr 06
0
Likelihood returning inf values to optim(L-BFGS-B) other
Hello, A couple of ideas... Im not clear on your whole problem however... Consider making use of the lgamma function, which returns the natural log of the gamma function. This may help. The gamma function gets awfully, big very fast. Also multivariable likelihoods can be bumpy like a mountain range, with minor peaks and valleys. It is possible that your likelihood has such a shape. Maybe
2011 Apr 29
1
Handling of irregular time series in lineChart
Hi, I realized that when I have irregular series to feed into lineChart, the interval of each point in the chart does not seem to take care of irregular time interval I specified in my input xts time series. But rather, lineChart seems to take each point as equal spaced time series. For example, I have the following code: library(quantmod) options(digits.sec=3) t0 <-
2019 May 22
3
HTTPS warning on developer.r-project.org
[Please CC me on replies, as I am not subscribed.] Dear R folks, Accessing the *R Developer Page* [1], the browser (Firefox) shows an HTTPS warning. The reason is the embedded Google logo. > Gemischte (unsichere) Anzeige-Inhalte von "http://www.google.com/logos/Logo_40wht.gif" werden auf einer sicheren Seite geladen Could you change that to an HTTPS link please? ``` $ curl -I
2010 Jul 14
1
Converting POSIXct vales to real values
I have a dataframe that contains time values in the form of yyyy-mm-dd hh:mm i.e. 2010-07-14 13:00. When I convert this to numeric via tvec <- as.numeric(Time) I get a number that is in seconds. So far so good. When I then divide the numeric value by the number of seconds in a day eg tvec/(60*60*24) I only get integer values and not fraction of a day which is what I want. What do I need to
2004 Jan 07
1
keystroke logging
> > >What do you recommend for keeping track of user >activities? For preserving bash histories I followed >these recommendations: > >http://www.defcon1.org/secure-command.html > Interesting reading but, as others have noted, of limited use. Keystroke logging can be disabled by - as others have noted - either spawning another (perhaps different) shell, using a remote
2011 Aug 26
3
How to vectorize a function to handle two vectors
Dear R-users I am trying to "vectorize" a function so that it can handle two vectors of inputs. I want the function to use phi (a function), k[1] and t[1] for the first price, and so on for the second, third and fourth price. I tried to do the mapply, but I dont know how to specify to R what input I want to be vectors (k and t)(see in the bottom what I tried). I have read the help file,
2011 Oct 04
2
adding a dummy variable...
Hi all, I have a dataset of individuals where the variable ID corresponds to the identification of the household where the individual lives. rel.head stands for the relationship with the household head. so rel.head=1 is the household head, rel.head=2 is the spouse, rel.head=3 is the children. Here is an example to see how it looks like: df<-data.frame(ID=c("17100",
2004 Jan 05
3
optim function : "BFGS" vs "L-BFGS-B"
Dear kind R-experts. Does anybody have an experience to use optim function? If yes, what is the main difference between two method "BFGS" vs "L-BFGS-B"? I used "BFGS" method and got what I wanted. But when I used "L-BFGS-B" the error message said that "L-BFGS-B needs finite values of fn". So that means "BFGS" method can handle even if fn
2011 Feb 25
2
BFGS versus L-BFGS-B
Hi all, I'm trying to figure out the effective differences between BFGS and L-BFGS-B are, besides the obvious that L-BFGS-B should be using a lot less memory, and the user can provide box constraints. 1) Why would you ever want to use BFGS, if L-BFGS-B does the same thing but use less memory? 2) If i'm optimizing with respect to a variable x that must be non-negative, a common approach
2008 Apr 15
1
disturbing seed dependence in optim L-BFGS-B method
The the use of optim with the L-BFGS-B method for the following simple function gives erroneous results. Any help appreciated! Best, Bob Reilly # Code: V=function(p){ p1=p[1];p2=p[2] y=p1*p2-.4*(p1+p2) return(-y)} p=c(.2,.2) # p=c(.8,.8) max=optim(p,V,method = "L-BFGS-B",lower=c(0,0),upper=c(1,1)) max1=optim(max$par,V,method = "L-BFGS-B",lower=c(0,0),upper=c(1,1))
2016 Oct 10
0
optim(…?=, =?utf-8?Q?method=‘L-BFGS-B’) stops with an error message while violating the lower bound
>>>>> Spencer Graves <spencer.graves at prodsyse.com> >>>>> on Sat, 8 Oct 2016 18:03:43 -0500 writes: [.............] > 2. It would be interesting to know if the > current algorithm behind optim and optimx with > method='L-BFGS-B' incorporates Morales and Nocedal (2011) > 'Remark on ?Algorithm 778:
2011 May 25
1
L-BFGS-B and parscale in optim()
Hi, When using method L-BFGS-B along with a parscale argument, should the lower and upper bounds provided be on the scaled or unscaled values? Thanks. Cheers, -- Seb
2016 Oct 08
0
optim(…, method=‘L-BFGS-B’) stops with an error message while violating the lower bound
Hi Spencer: See the link below about L-BFGS-B below because I had problems with it a good while back (and I think the link description is the cause but I can't prove it ) so eventually I moved to the Rvmmin(b) package. It's a package but really an algorithm. Rvmmin(b) uses a variable-metric algorithm similar to that of L-BFGS-B but without the problem below. It's not surprisingly a
2007 Jul 30
1
stop criteria when "L-BFGS-B needs finite values of 'fn' " in optim
Hi all! I'm running some simulations and I need to estimate some paramaters with optim( ), in some cases optim stops with the next message: "L-BFGS-B needs finite values of 'fn' " I would like to know how to include and "if" condition when this happen, could it be something like: myfun <- optim(....) # run my function
2019 May 03
0
R optim(method="L-BFGS-B"): unexpected behavior when working with parent environments
On 02/05/2019 21:35, Florian Gerber wrote: > Dear all, > > when using optim() for a function that uses the parent environment, I > see the following unexpected behavior: > > makeFn <- function(){ > ??? xx <- ret <- NA > ??? fn <- function(x){ > ?????? if(!is.na(xx) && x==xx){ > ?????????? cat("x=", xx, ", ret=", ret, "