similar to: Problem with constrained optimization with maxBFGS

Displaying 20 results from an estimated 100 matches similar to: "Problem with constrained optimization with maxBFGS"

2011 Apr 08
0
Fwd: The results of your email commands
Hi R community, I posted a question on using the R maximum likelihood functions a short while ago and got an email saying that some of the content was "unprocessed". Hence, I am reposting the question just to be sure (sorry for the multiple emails if both reached you). My question is reagarding the way we use constraints in programs like maxBFGS, etc. We need to put two matrices into
2007 Apr 09
1
R:Maximum likelihood estimation using BHHH and BFGS
Dear R users, I am new to R. I would like to find *maximum likelihood estimators for psi and alpha* based on the following *log likelihood function*, c is consumption data comprising 148 entries: fn<-function(c,psi,alpha) { s1<-sum(for(i in 1:n){(c[i]-(psi^(-1/alpha)*(lag(c[i],-1))))^2* (lag(c[i],-1)^((-2)*(alpha+1)) )}); s2<- sum(for(m in 1:n){log(lag(c[m],-1)^(((2)*alpha)+2))});
2010 Feb 08
0
Mixed logit models with a random coefficient
Hi All, Sorry to bother you. I'm trying to estimate a set of discrete choice data in R with mixed logit models where one coefficient is random and normally distributed. I've searched on the R help archive and don't see much information very specific to what I'm doing, so I write the code myself, which involves simulated maximum likelihood. But it doesn't work, as I compare
2005 Mar 09
2
Structural equation models with R
Hello useRs, I`m running structural equation models with R, but for one of my models the below error message apears. I`m trying to change startvalues but without success. The manual for sem package did not help me. Does anyone knows how to change startvalues for iteration in sem package? Or it can be another problem with the model? Error in startvalues(S, ram, debug = debug, tol = start.tol)
2013 Jan 02
1
Need help with self-defined function to perform nonlinear regression and get prediction interval
Dear All, I was trying to call a self-defined function that performs nonlinear regression and gets the corresponding prediction upper limit using nls2 package. However, weird thing happened. When I called the function in the main program, an error message "fitted(nlsmodel): object 'nlsmodel' not found" came up. But when I directly ran the codes inside the function, no error came
2020 Oct 09
1
[External] Re: unable to access index for repository...
>>>>> Steven Yen >>>>> on Fri, 9 Oct 2020 05:39:48 +0800 writes: > Oh Hi Arne, You may recall we visited with this before. I > do not believe the problem is algorithm specific. The > algorithms I use the most often are BFGS and BHHH (or > maxBFGS and maxBHHH). For simple econometric models such > as probit, Tobit, and evening
2004 Jan 02
2
SEM help!!!
I have just started using the SEM package in R, so I'm not sure I'm doing everything right, but I keep getting an error concerning startvalues and I can't figure out how to fix it. Is anyone willing to read over my code and help me out??? Please email me if you are willing to look at my code and I will send it to you. Thank you so much, and Happy New Year! cathy
2004 Sep 29
2
optim "a log-likelihood function"
Hello, i know that i have to use optim, but i'm confused how its possible maximize the sum over all l[i] and get the optimized max(LL), r and alpha? LL <- function(trans,time){ for(i in 1:length(trans){ l[i] <- log(lgamma(r+trans[i] - gamma(r+1)*(alpha/alpha+t[i]))**r)*(t[i]/alpha+t[i]))**trans[i] } return(sum(l)) } i'm confused how i have to set r and alpha and i
2010 Jun 25
1
Different standard errors from R and other software
Hi all, Sorry to bother you. I'm estimating a discrete choice model in R using the maxBFGS command. Since I wrote the log-likelihood myself, in order to double check, I run the same model in Limdep. It turns out that the coefficient estimates are quite close; however, the standard errors are very different. I also computed the hessian and outer product of the gradients in R using the
2004 May 12
1
Sem error - subscript out of bounds
What??s happening with this following code: require(sem) Celpe.Mod.RAM <- matrix(c( # path parametro Inicio "Produ????o -> T1", "gamma.11", NA, "Produ????o -> T2", "gamma.12", NA,
2020 Oct 08
0
[External] Re: unable to access index for repository...
Oh Hi Arne, You may recall we visited with this before. I do not believe the problem is algorithm specific. The algorithms I use the most often are BFGS and BHHH (or maxBFGS and maxBHHH). For simple econometric models such as probit, Tobit, and evening sample selection models, old and new versions of R work equally well (I write my own programs and do not use ones from AER or sampleSekection).
2007 Apr 11
1
creating a path diagram in sem
Hello, I finally run my measurement model in sem - successfully. Now, I am trying to print out the path diagram that is based on the results - but for some reason it's not working. Below is my script - but the problem is probably in my very last line: # ANALYSIS OF ANXIETY, DEPRESSION, AND FEAR - LISREL P.31 library(sem) # Creating the ANXIETY, DEPRESSION, AND FEAR intercorrelation matrix
2004 Jun 17
0
beta regression in R
Hello, I'm using optim to program a set of mle regression procedures for non-normal disturbances. This is for teaching and expository purposes only. I've successfully programmed the normal, generalized gamma, gamma, weibull, exponential, and lognormal regression functions. And optim returns reasonable answers for all of these compared with the identical optimization problems in STATA and
2007 Feb 14
0
environment confusion
I'm in a bit beyond my depth with environments and such. The environment of a particular function, which I've set so it should have the things it needs, seems to be getting "lost" at some point during a call sequence. It's hard to come up with a _simple_ reproducible example, although if anyone's sufficiently interested I can post the package somewhere -- with the
2008 Apr 26
1
How to use the optim function if the length of the objective function is greater than 1?
Hi, Please help me out with this.Im a new user of R. Thanks [[alternative HTML version deleted]]
2009 Jan 26
1
sem package: start values
Hello- If I input a variance-covariance matrix and specify NA for start values, how does sem determine the start value? Is there a default? Anthony -- Anthony Steven Dick, Ph.D. Post-Doctoral Fellow Human Neuroscience Laboratory Department of Neurology The University of Chicago 5841 S. Maryland Ave. MC-2030 Chicago, IL 60637 Phone: (773)-834-7770 Email: adick at uchicago.edu Web:
2009 Dec 01
1
Adding and Multiplying two Unevaluated Expressions
HI, As I'm trying to compute Taylor series, I'm having problems in adding and multiplying unevaluated expressions. I searched for a solution but found none. my Taylor function works fine for evaluating functions as you can see here: rTaylorVal=function(exp,x0,dx,n) { ls=list(x=x0) newexp=eval(exp,ls) exp0=exp for (i in 1:n){ exp0=D(exp0,"x")
2020 Oct 08
2
[External] Re: unable to access index for repository...
Hi Steven Which optimisation algorithms in maxLik work better under R-3.0.3 than under the current version of R? /Arne On Thu, 8 Oct 2020 at 21:05, Steven Yen <styen at ntu.edu.tw> wrote: > > Hmm. You raised an interesting point. Actually I am not having problems with aod per se?-it is just a supporting package I need while using old R. The essential package I need, maxLik, simply
2007 Apr 09
3
sem vs. LISREL: sem fails
I am new to R. I just tried to recreate in R (using sem package and the identical input data) a solution for a simple measurment model I have found before in LISREL. LISREL had no problems and converged in just 3 iterations. In sem, I got no solution, just the warning message: "Could not compute QR decomposition of Hessian. Optimization probably did not converge. in: sem.default(ram =
2011 May 16
0
SEM Model Not Converging
I'm trying to build a SEM using the sem package. I'll attach my model specification below. When I turn debug=TRUE, it seems as if I'm getting to convergence because I get this message: Successive iterates within tolerance. Current iterate is probably solution. However, at the end of the process I get this message: Warning message: In sem.default(ram = ram, S = S, N = N,