Displaying 20 results from an estimated 4000 matches similar to: "Can I monitor the iterative/convergence process while using Optim or MaxLik?"
2010 Oct 01
1
Place constrictions on parameters when using Optim and MaxLik
Hi R users,
I am trying to restrct the range of two of the parameters in a maximization
problem. Both parameters should be between -1 and 1. As far as I know, if
I choose the estimation method ="L-BFGS-B" under Optim, I can restrict the
parameter space. However, the "L-BFGS-B" always require finite values of
the loglik function and cannot get around of the problem if an
2011 Mar 20
3
How to draw a map of Europe?
Hi R users,
I need to draw a map of select European countries with country names shown
on the map. Does anyone know how to do this in R?
Also, is it possible to draw a historical map of European countries using R?
Thanks a lot for your help.
Maomao
[[alternative HTML version deleted]]
2012 Feb 01
3
Probit regression with limited parameter space
Dear R helpers,
I need to estimate a probit model with box constraints placed on several of
the model parameters. I have the following two questions:
1) How are the standard errors calclulated in glm
(family=binomial(link="probit")? I ran a typical probit model using the
glm probit link and the nlminb function with my own coding of the
loglikehood, separately. As nlminb does not
2010 Aug 28
1
maxNR in maxLik package never stops
Greetings,
I use maxNR function under maxLik package to find the REML estimates of the parameters of variance components in heteroskedastic linear regression models. I assume that in the model there is additive/multiplicative/mixed heteroskedasticity and I need estimate the respective parameters of additive/multiplicative/mixed variance components.
For my research purposes I make a
2010 May 10
2
Robust SE & Heteroskedasticity-consistent estimation
Hi,
I'm using maxlik with functions specified (L, his gradient & hessian).
Now I would like determine some robust standard errors of my estimators.
So I 'm try to use vcovHC, or hccm or robcov for example
but in use one of them with my result of maxlik, I've a the following
error message :
Erreur dans terms.default(object) : no terms component
Is there some attributes
2010 Oct 15
1
Problem using BRugs
Hi R users,
I am trying to call openbugs from R. And I got the following error message:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
model is syntactically correct
expected the collection operator c error pos 8 (error on line 1)
variable ww is not defined in model or in data set
[1] "C:\\DOCUME~1\\maomao\\LOCALS~1\\Temp\\RtmpqJk9R3/inits1.txt"
2009 Jul 12
2
Heckman Selection MOdel Help in R
Hi Saurav!
On Sun, Jul 12, 2009 at 6:06 PM, Pathak,
Saurav<s.pathak08 at imperial.ac.uk> wrote:
> I am new to R, I have to do a 2 step Heckman model, my selection equation is
> below which I was successful in running but I am unable to proceed further,
>
>
>
> I have so far used the following command
>
> glm(formula = s ~ age + gender + gemedu + gemhinc + es_gdppc +
2010 Oct 25
1
if statement and truncated distribution
Hi R helpers,
I am trying to use the if statement to generate a truncated random variable
as follows:
if (y[i]==0) { v[i] ~ rnorm(1,0,1) | (-inf ,0) }
if (y[i]==1) { v[i] ~ rnorm(1,0,1) | (0, inf) }
I guess I cannot use " | ( , ) " to restrict the range of a variable in R.
Could you let me know how to write the code correctly in R?
Many thanks for your help.
Maomao
[[alternative
2010 Sep 04
3
How can I fixe convergence=1 in optim
Hi R users,
I am using the optim funciton to maximize a log likelihood function. My
code is as follows:
p<-optim(c(-0.2392925,0.4653128,-0.8332286, 0.0657, -0.0031, -0.00245,
3.366, 0.5885, -0.00008,
0.0786,-0.00292,-0.00081, 3.266, -0.3632, -0.000049, 0.1856,
0.00394, -0.00193, -0.889, 0.5379, -0.000063,
0.213, 0.00338, -0.00026, -0.8912, -0.3023, -0.000056), f,
2010 Aug 25
3
What does this warning message (from optim function) mean?
Hi R users,
I am trying to use the optim function to maximize a likelihood funciton, and
I got the following warning messages.
Could anyone explain to me what messege 31 means exactly? Is it a cause for
concern?
Since the value of convergence turns out to be zero, it means that the
converging is successful, right?
So can I assume that the parameter estimates generated thereafter are
reliable MLE
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
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).
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
2009 Mar 02
1
initial gradient and vmmin not finite
Dear Rhelpers
I have the problem with initial values, could you please tell me how to solve it?
Thank you
June
> p = summary(maxLik(fr,start=c(0,0,0,1,0,-25,-0.2)))
Error in maxRoutine(fn = logLik, grad = grad, hess = hess, start = start, :
NA in the initial gradient
> p = summary(maxLik(fr,start=c(0,0,0,1,0,-25,-0.2),method="BFGS"))
Error in optim(start, func, gr =
2020 Oct 08
0
[External] Re: unable to access index for repository...
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 works better under R-3.0.3, for reason I do not understand?specifically the numerical gradients of the likelihood function are not evaluated as accurately in newer versions of R in my experience, which is why
2010 Mar 12
2
Question regarding to maxNR
Hi R-users,
Recently, I use maxNR function to find maximizer. I have error appears as follows
Error in maxNRCompute(fn = fn, grad = grad, hess = hess, start = start, :
NA in the initial gradient
My code is
mu=2
s=1
n=300
library(maxLik)
set.seed(1004)
x<-rcauchy(n,mu,s)
loglik<-function(mu)
{
log(prod(dcauchy(x,mu,s)))
}
maxNR(loglik,start=median(x))$estimate
Does anyone know how
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
2007 Oct 30
2
Splitting up the micEcon package?
Dear R Users:
The functions of our "micEcon" package [1,2] can be subdivided into three
categories:
- microeconomic demand and firm models
- sample selection models (mainly selection())
- routines for (likelihood) maximisation (e.g. maxLik(), maxNR(), maxBHHH())
(mainly used for ML estimation of sample selection models)
Although sample selection models are often used in
2010 May 14
1
Creating an S3 method when the generic function is defined in another (imported) package
Hi,
In one of my packages (maxLik), I would like to add an S3 method,
where the generic function (estfun) is defined in another package
(sandwich). Everything works fine if my package "Depends" on the other
package and I import the generic function "estfun" from the "sandwich"
package and define the new method in the NAMESPACE file. However, I
prefer not to load the
2010 Mar 22
1
maxNR - Error in p(a, b) : element 1 is empty; the part of the args list of '*' being evaluated was: (b, t)
Hello everyone...
We were trying to implement the Newton-Raphson method in R, and estimate the
parameters a and b, of a function, F, however we can't seem to implement
this the right way. Hope you can show me the right way to do this. I think
what we want R to do is to read the data from the website and then peform
maxNR on the function, F. Btw the version of R being used is "RGui for