Displaying 20 results from an estimated 10000 matches similar to: "How robust is mle in R?"
2011 Mar 28
1
maximum likelihood accuracy - comparison with Stata
Hi everyone,
I am looking to do some manual maximum likelihood estimation in R. I
have done a lot of work in Stata and so I have been using output
comparisons to get a handle on what is happening.
I estimated a simple linear model in R with lm() and also my own
maximum likelihood program. I then compared the output with Stata.
Two things jumped out at me.
Firstly, in Stata my coefficient
2003 Jul 14
2
Hypothesis testing after optim
Hi folks: Does anyone know of a way to do (linear) hypothesis tests of
parameters after fitting a maximum-likelihood model w/ optim? I can't seem
to find anything like a Wald test whose documentation says it applies to
optim output.
Also, thanks again to everyone who gave me feedback on the robustness of ML
estimation in R!
Peter
********************************
2008 Aug 12
2
Maximum likelihood estimation
Hello,
I am struggling for some time now to estimate AR(1) process for commodity price time series. I did it in STATA but cannot get a result in R.
The equation I want to estimate is: p(t)=a+b*p(t-1)+error
Using STATA I get 0.92 for a, and 0.73 for b.
Code that I use in R is:
p<-matrix(data$p) # price at time t
lp<-cbind(1,data$lp) # price at time t-1
2004 May 10
1
Explaining Survival difference between Stata and R
Dear Everybody:
I'm doing my usual "how does that work in R" thing with some Stata
projects. I find a gross gap between the Stata and R in Cox PH models,
and I hope you can give me some pointers about what goes wrong. I'm
getting signals from R/Survival that the model just can't be estimated,
but Stata spits out numbers just fine.
I wonder if I should specify initial
2005 Jun 07
1
R and MLE
I learned R & MLE in the last few days. It is great! I wrote up my
explorations as
http://www.mayin.org/ajayshah/KB/R/mle/mle.html
I will be most happy if R gurus will look at this and comment on how
it can be improved.
I have a few specific questions:
* Should one use optim() or should one use stats4::mle()?
I felt that mle() wasn't adding much value compared with optim, and
2006 Jan 29
1
Logit regression using MLE
I have used the following code to obtain a max likelihood estimator for
a logit regression. The final command invokes ‘optim’ to obtain the
parameter estimates. The code works OK but I want to use the ‘mle’
function in the ‘stats4’ package instead of directly calling ‘optim’.
Can someone please figure out the command to do this?
Thank you in advance.
Martin
# mlelo.r - maximum
2006 Feb 10
8
Fitdistr and MLE for parameter lambda of Poisson distribution
Hello!
I would like to get MLE for parameter lambda of Poisson distribution. I
can use fitdistr() for this. After looking a bit into the code of this
function I can see that value for lambda and its standard error is
estimated via
estimate <- mean(x)
sds <- sqrt(estimate/n)
Is this MLE? With my poor math/stat knowledge I thought that MLE for
Poisson parameter is (in mixture of LaTeX
2010 Jan 04
2
MLE optimization
Folks,
I'm kind of newbie in R, but with some background in Matlab and VBA
programming. Last month I was implementing a Maximum Likelihood Estimation
in Matlab, but the algorithms didn't converge. So my academic advisor
suggested using R. My problem is: estimate a mean reverting jump diffusion
parameters. I've succeeded in deriving the likelihood function (which looks
like a gaussian
2008 Jun 11
2
MLE Estimation of Gamma Distribution Parameters for data with 'zeros'
Greetings, all
I am having difficulty getting the fitdistr() function to return without
an error on my data. Specifically, what I'm trying to do is get a
parameter estimation for fracture intensity data in a well / borehole.
Lower bound is 0 (no fractures in the selected data interval), and upper
bound is ~ 10 - 50, depending on what scale you are conducting the
analysis on.
I read in the
2008 Apr 10
4
Huber-white cluster s.e. after optim?
I've used optim to analyze some data I have with good results, but
need to correct the var-cov matrix for possible effects of clustering
of observations (respondents) in small groups (non-independence). Is
there any function to adjust the matrix? I heard some time ago that
the vcovHC function would have a cluster capability added to it, but I
don't see that in my fairly recent version.
2004 Sep 01
1
error in mle
Friends
I'm trying fit a survival model by maximum likelihood estimation using this function:
flver=function(a1,a2,b1,b2)
{
lver=-(sum(st*log(exp(a1*x1+a2*x2)))+sum(st*log(hheft(exp(b1*x1+b2*x2)*t,f.heft)))
-(exp(a1*x1+a2*x2)/exp(b1*x1-b2*x2))*sum(-log(1-pheft(exp(b1*x1+b2*x2)*t,f.heft))))
}
emv=mle(flver,start=list(a1=0,a2=0,b1=0,b2=0))
where hheft and pheft are functions defined in
2011 Feb 22
2
mle
Hi,
I am looking for some help regarding the use of the mle function.
I am trying to get mle for 3 parameters (theta0, theta1 and theta2) that
have been defined in the the log-likelihood equation as theta0=theta[1],
theta1=theta[2] and theta2=theta[3].
My R code for mle is:
mle(Poisson.lik, start=list(theta=c(20,1,1), method="Nelder-Mead",
fixed=list(w=w, t1=t1, t2=t2))
But I keep
2006 Feb 02
2
how to use mle?
>Y
[,1] [,2] [,3]
[1,] 0 1 0
[2,] 0 1 0
[3,] 0 0 1
[4,] 1 0 0
[5,] 0 0 1
[6,] 0 0 1
[7,] 1 0 0
[8,] 1 0 0
[9,] 0 0 1
[10,] 1 0 0
>X
pri82 pan82
1 0 0
2 0 0
3 1 0
4 1 0
5 0 1
6 0 0
7 1 0
8 1 0
9 0 0
10
2005 Jan 18
2
Function to modify existing data.frame
I'm used to statistical languages, such as Stata, in which it's trivial to
pass a list of variables to a function & have that function modify those
variables in the existing dataset rather than create copies of the variables
or having to replace the entire dataset to change a few variables. In R, I
suppose I could paste together the right instructions in a function and then
execute
2004 Jul 22
2
Programmation pour MLE
Bonjour,
Je veux cherché l’estimateur de vraisemblance maximal (MLE)d’une fonction à 3 paramètre inconue étant donné une échantillon de taille 50 (les observations des valeurs de x) alors comment je peux procédé
La fonction de densité est définie par :
f(x)= 1/3(g(a1)+g(a2)+g(a3))
avec g(ai)=(exp(ai)*ai^x)/x! pour i=1,2,3.
Je vous remercie beaucoup.
A. Elhabti
2005 Jul 21
1
About object of class mle returned by user defined functions
Hi,
There is something I don't get with object of class "mle" returned by a
function I wrote. More precisely it's about the behaviour of method
"confint" and "profile" applied to these object.
I've written a short function (see below) whose arguments are:
1) A univariate sample (arising from a gamma, log-normal or whatever).
2) A character string
2012 Jul 05
3
Maximum Likelihood Estimation Poisson distribution mle {stats4}
Hi everyone!
I am using the mle {stats4} to estimate the parameters of distributions by
MLE method. I have a problem with the examples they provided with the
mle{stats4} html files. Please check the example and my question below!
*Here is the mle html help file *
http://stat.ethz.ch/R-manual/R-devel/library/stats4/html/mle.html
http://stat.ethz.ch/R-manual/R-devel/library/stats4/html/mle.html
2009 Apr 08
3
MLE for bimodal distribution
Hello everyone,
I'm trying to use mle from package stats4 to fit a bi/multi-modal
distribution to some data, but I have some problems with it.
Here's what I'm doing (for a bimodal distribution):
# Build some fake binormally distributed data, the procedure fails also with
real data, so the problem isn't here
data = c(rnorm(1000, 3, 0.5), rnorm(500, 5, 0.3))
# Just to check
2011 Nov 25
1
Unable to reproduce Stata Heckman sample selection estimates
Hello,
I am working on reproducing someone's analysis which was done in
Stata. The analysis is estimation of a standard Heckman sample
selection model (Tobit-2), for which I am using the sampleSelection
package and the selection() function. I have a few problems with the
estimation:
1) The reported standard error for all estimates is Inf ...
vcov(selectionObject) yields Inf in every
2006 Mar 15
3
Help on factanal.fit.mle
Hi
Can anybody please suggest me about the documentation of "factanal.fit.mle()"
(Not factanal()------ searching factanal.fit.mle() in R always leads to
factanal()).
Is there any function for doing principal component factor analysis in R.
Regards
Souvik Bandyopadhyay
JRF,
Dept Of Statistics
Calcutta University
[[alternative HTML version deleted]]