Re: [R] maximum-likelihood-estimation with mle()

2015-09-12 Thread Ben Bolker
peter dalgaard gmail.com> writes: > > You are being over-optimistic with your starting values, and/or > with constrains on the parameter space. > Your fit is diverging in sigma for some reason known > only to nonlinear-optimizer gurus... > > For me, it works either to put in an explicit > c

Re: [R] maximum-likelihood-estimation with mle()

2015-09-11 Thread peter dalgaard
You are being over-optimistic with your starting values, and/or with constrains on the parameter space. Your fit is diverging in sigma for some reason known only to nonlinear-optimizer gurus... For me, it works either to put in an explicit constraint or to reparametrize with log(sigma). E.g.

[R] maximum-likelihood-estimation with mle()

2015-09-11 Thread Ronald Kölpin
Hi everyone, I have a problem with maximum-likelihood-estimation in the following situation: Assume a functional relation y = f(x) (the specific form of f should be irrelevant). For my observations I assume (for simplicity) white noise, such that hat(y_i) = f(x_i) + epsilon_i, with the epsilon_i

Re: [R] Maximum likelihood with analytical Hessian and

2014-12-18 Thread Xavier Robin
2 >> Date: Wed, 17 Dec 2014 21:46:16 +0100 >> From: Xavier Robin >> To: r-help@r-project.org >> Subject: [R] Maximum likelihood with analytical Hessian and >> Message-ID: <5491eb98.6090...@lindinglab.org> >> Content-Type: text/plain; charset=utf-8 >> >&

Re: [R] Maximum likelihood with analytical Hessian and

2014-12-18 Thread Prof J C Nash (U30A)
vier Robin > To: r-help@r-project.org > Subject: [R] Maximum likelihood with analytical Hessian and > Message-ID: <5491eb98.6090...@lindinglab.org> > Content-Type: text/plain; charset=utf-8 > > Dear list, > > I have an optimization problem that I would like to s

[R] Maximum likelihood with analytical Hessian and

2014-12-17 Thread Xavier Robin
Dear list, I have an optimization problem that I would like to solve by Maximum Likelihood. I have analytical functions for the first and second derivatives of my parameters. In addition, some parameters are constrained between 0 and 1, while some others can vary freely between -Inf and +Inf. I a

[R] Maximum likelihood Estimation

2014-10-10 Thread Parvin Dehghani
maximum likelihood estimation pari hesabi 6:04 AM To: r-help@r-project.org Hello, As an example for Exponential distribution the MLE is got by this structure: t <- rexp(100, 2) loglik <- function(theta){ log(theta) - theta*t} a <- maxLik(loglik, start=1) print(a) Exponential distribution has

Re: [R] maximum likelihood estimation

2014-10-10 Thread Arne Henningsen
On 10 October 2014 08:04, pari hesabi wrote: > Hello,As an example for Exponential distribution the MLE is got by this > structure:t <- rexp(100, 2)loglik <- function(theta){ log(theta) - theta*t}a > <- maxLik(loglik, start=1)print(a)Exponential distribution has a simple > loglikelihood functio

[R] maximum likelihood estimation

2014-10-09 Thread pari hesabi
Hello,As an example for Exponential distribution the MLE is got by this structure:t <- rexp(100, 2)loglik <- function(theta){ log(theta) - theta*t}a <- maxLik(loglik, start=1)print(a)Exponential distribution has a simple loglikelihood function. But if a new pdf has a more complicated form like

Re: [R] maximum likelihood estimation

2014-10-09 Thread Arne Henningsen
Dear Pari On 7 October 2014 10:55, pari hesabi wrote: > HelloI am trying to estimate the parameter of a function by the Maximum > Likelihood Estimation method.If the function is the difference between two > integrals: C<-function(n){integrand3<-function(x) {((2-x)^n)*(exp(ax-2))}cc<- > integr

[R] maximum likelihood estimation

2014-10-07 Thread pari hesabi
HelloI am trying to estimate the parameter of a function by the Maximum Likelihood Estimation method.If the function is the difference between two integrals: C<-function(n){integrand3<-function(x) {((2-x)^n)*(exp(ax-2))}cc<- integrate (integrand3,0,2)print(cc)} D<-function(n){integrand4<-functi

Re: [R] Maximum likelihood estimation (stats4::mle)

2014-07-22 Thread Ronald Kölpin
Thanks, that was exactly it -- switching the values did the trick (and was actually correct in terms of theory.) And of course, you are right -- i changed the starting values to mean(x) - mean(y) for mu and sqrt(var(x-y)) for sigma. I also see your point about the theoretical justification for the

Re: [R] Maximum likelihood estimation (stats4::mle)

2014-07-22 Thread peter dalgaard
On 22 Jul 2014, at 06:04 , David Winsemius wrote: > > On Jul 21, 2014, at 12:10 PM, Ronald Kölpin wrote: > >> Dear R-Community, >> >> I'm trying to estimate the parameters of a probability distribution >> function by maximum likelihood estimation (using the stats4 function >> mle()) but can't

Re: [R] Maximum likelihood estimation (stats4::mle)

2014-07-21 Thread David Winsemius
On Jul 21, 2014, at 12:10 PM, Ronald Kölpin wrote: > Dear R-Community, > > I'm trying to estimate the parameters of a probability distribution > function by maximum likelihood estimation (using the stats4 function > mle()) but can't seem to get it working. > > For each unit of observation I hav

[R] Maximum likelihood estimation (stats4::mle)

2014-07-21 Thread Ronald Kölpin
Dear R-Community, I'm trying to estimate the parameters of a probability distribution function by maximum likelihood estimation (using the stats4 function mle()) but can't seem to get it working. For each unit of observation I have a pair of observations (a, r) which I assume (both) to be log-nor

[R] Maximum likelihood estimation of ARMA(1,1)-GARCH(1,1)

2013-04-08 Thread Andy Yeh
Hello Following some standard textbooks on ARMA(1,1)-GARCH(1,1) (e.g. Ruey Tsay's Analysis of Financial Time Series), I try to write an R program to estimate the key parameters of an ARMA(1,1)-GARCH(1,1) model for Intel's stock returns. For some random reason, I cannot decipher what is wrong with

Re: [R] maximum likelihood estimation in R

2012-11-12 Thread Ben Bolker
David Winsemius comcast.net> writes: > > > On Nov 10, 2012, at 9:22 PM, mmosalman wrote: > > > I want to find ML estimates of a model using mle2 in bbmle package. When I > > insert new parameters (for new covariates) in model the log-likelihood value > > does not change and the estimated value

Re: [R] maximum likelihood estimation in R

2012-11-10 Thread David Winsemius
On Nov 10, 2012, at 9:22 PM, mmosalman wrote: > I want to find ML estimates of a model using mle2 in bbmle package. When I > insert new parameters (for new covariates) in model the log-likelihood value > does not change and the estimated value is exactly the initial value that I > determined. Wha

[R] maximum likelihood estimation in R

2012-11-10 Thread mmosalman
I want to find ML estimates of a model using mle2 in bbmle package. When I insert new parameters (for new covariates) in model the log-likelihood value does not change and the estimated value is exactly the initial value that I determined. What's the problem? This is the code and the result: As

[R] Maximum likelihood fitting of a functional relationship (MLFR)

2012-09-05 Thread Turgut Durduran
  Hello all, Evidently my previous message met some filter due to subject line. I am re-sending my message. I apologize if this was sent out twice. Based on "Ripley & Thompson, Analyst, 1987 ", I am trying to do a regression of my data which assumes a linear relationship between measurement

[R] Maximum-likelihood fitting of a functional relationship(Ripley & Thompson) type analysis

2012-09-05 Thread Turgut Durduran
Hello all, Based on "Ripley & Thompson, Analyst, 1987 ", I am trying to do a regression of my data which assumes a linear relationship between measurements by two modalities of the same physiological parameter. The complication is that my errors are heterogeneous, i.e. not only both X & Y var

[R] Maximum Likelihood estimation of KB distribution

2012-07-17 Thread chamilka
Hi, The following distribution is known as Kumaraswamy binomial Distribution. http://r.789695.n4.nabble.com/file/n4636782/kb.png For a given data I need to estimate the paramters (alpha and beta) of this distribution(Known as Kumaraswamy binomial Distribution, A Binomial Like Distribution). For t

Re: [R] Maximum Likelihood Estimation Poisson distribution mle {stats4}

2012-07-05 Thread chamilka
Thank you very much Professor .Peter Dalgaard for your kind explanations.. This made my work easy.. I am struggling with this for more than 2 days and now I got the correct reply. Thank again. -- View this message in context: http://r.789695.n4.nabble.com/Maximum-Likelihood-Estimation-Poisson-d

Re: [R] Maximum Likelihood Estimation Poisson distribution mle {stats4}

2012-07-05 Thread chamilka
Thank you S Ellison-2 for your reply. I will understand it with Prof.Peter Dalgaard's answer.. -- View this message in context: http://r.789695.n4.nabble.com/Maximum-Likelihood-Estimation-Poisson-distribution-mle-stats4-tp4635464p4635484.html Sent from the R help mailing list archive at Nabble.c

Re: [R] Maximum Likelihood Estimation Poisson distribution mle {stats4}

2012-07-05 Thread peter dalgaard
On Jul 5, 2012, at 10:48 , chamilka wrote: > 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 m

Re: [R] Maximum Likelihood Estimation Poisson distribution mle {stats4}

2012-07-05 Thread S Ellison
> -Original Message- > > sample.mean<- sum(x*y)/sum(y) > > sample.mean > [1] 3.5433 > > *This is the contradiction!! * > Here I am getting the estimate as 3.5433(which is reasonable > as most of the values are clustered around 3), but mle code > gives the estimate 11.545(which may not be

[R] Maximum Likelihood Estimation Poisson distribution mle {stats4}

2012-07-05 Thread chamilka
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-dev

[R] Maximum likelihood for censored geometric distribution

2011-11-16 Thread A.D.Higginson
Hi all, I need to check for a difference between treatment groups in the parameter of the geometric distribution, but with a cut-off (i.e. right censored). In my experiment I stimulated animals to see whether I got a response, and stopped stimulating if the animal responded OR if I had stimul

Re: [R] Maximum Likelihood using optim()

2011-09-02 Thread Sam Stewart
I think the following pdf will explain the details of how to use the optim function. http://www.unc.edu/~monogan/computing/r/MLE_in_R.pdf Hope that helps, Sam On Fri, Sep 2, 2011 at 7:06 AM, Thiem Alrik wrote: > Dear mailing list, > > I would like to use the optim() command in order to maximiz

[R] Maximum Likelihood using optim()

2011-09-02 Thread Thiem Alrik
Dear mailing list, I would like to use the optim() command in order to maximize the logged likelihood of the following function, where p is the parameter of interest and should be constrained between 0 and positive infinity. y = 1/2 * ((te - x)/(te - tc))^p x and y are given by x <- c(5.18,

[R] maximum likelihood using nlm to estimate 4 variables

2011-06-27 Thread Edward Bowora
Hi I need help I am new to R and am having problems estimating parameters out of 3stage constrained function. I have constructed a code as below and my data are two colomns of R_j and R_m(sample given below). R_j and R_m represents the dependent and independent variables respectively. The paramet

[R] maximum likelihood using nlm to estimate 4 variables

2011-06-27 Thread ED
Hi I need help I am new to R and am having problems estimating parameters out of 3stage constrained function. I have constructed a code as below and my data are two colomns of R_j and R_m(sample given below). R_j and R_m represents the dependent and independent variables respectively. The paramet

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-22 Thread Mike Marchywka
> From: marchy...@hotmail.com > To: rvarad...@jhmi.edu; pda...@gmail.com; alex.ols...@gmail.com > Date: Sat, 21 May 2011 20:40:44 -0400 > CC: r-help@r-project.org > Subject: Re: [R] maximum likelihood convergence reproducing Anderson B

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-21 Thread Mike Marchywka
> From: rvarad...@jhmi.edu > To: marchy...@hotmail.com; pda...@gmail.com; alex.ols...@gmail.com > CC: r-help@r-project.org > Date: Sat, 21 May 2011 17:26:29 -0400 > Subject: RE: [R] maximum likelihood convergence reproducing An

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-21 Thread Ravi Varadhan
t know what is wrong with bobyqa in this example. In short, even with scaling and exact gradients, this optimization problem is recalcitrant. Best, Ravi. From: Mike Marchywka [marchy...@hotmail.com] Sent: Thursday, May 12, 2011 8:30 AM To: Ravi Varadhan; pda.

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-12 Thread Mike Marchywka
ation as much as anything). Thanks. > From: rvarad...@jhmi.edu > To: pda...@gmail.com; alex.ols...@gmail.com > Date: Sat, 7 May 2011 11:51:56 -0400 > CC: r-help@r-project.org > Subject: Re: [R] maximum likelihood convergence reproducing Anderson Blundell > 1982 Econometr

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-10 Thread Berend Hasselman
Alex Olssen wrote: > > Wow that is really interesting, > > Sorry I was asleep when you emailed these. > > And yes, of course, I had been trying to implement model 18, not 18s, > that was a typo, sorry. > > I will have a look at the code you posted. > > Thanks, > > Alex > I have run nlm wit

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-09 Thread Alex Olssen
ters - but since I called all the parameters theta anyway there >> is no need for it.  e1 and e2 are the residuals from the first and >> second equations of the system.  Sigma is a 2x2 matrix which is the >> outer product of the two vectors of residuals. >> >> Kind regards

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-09 Thread peter dalgaard
> > Kind regards, > > Alex > > > > On 9 May 2011 23:12, Mike Marchywka wrote: >> >> >> >> >> >> >> >>> Date: Mon, 9 May 2011 22:06:38 +1200 >>> From: alex.ols...@g

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-09 Thread peter dalgaard
On May 9, 2011, at 13:40 , Alex Olssen wrote: > Hi Mike, > > Mike said > "is this it, page 1559?" > > That is the front page yes, page 15*6*9 has the table, of which the > model labelled 18s is the one I replicated. > However, the R code you posted will at best replicate model 18. For 18s, yo

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-09 Thread Mike Marchywka
> Date: Mon, 9 May 2011 22:06:38 +1200 > From: alex.ols...@gmail.com > To: pda...@gmail.com > CC: r-help@r-project.org; da...@otter-rsch.com > Subject: Re: [R] maximum likelihood convergence reproducing Anderson Blundell > 1982

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-09 Thread Alex Olssen
ectors of residuals. Kind regards, Alex On 9 May 2011 23:12, Mike Marchywka wrote: > > > > > > > >> Date: Mon, 9 May 2011 22:06:38 +1200 >> From: alex.ols...@gmail.com >> To: pda...@gmail.com >> CC: r-help@

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-09 Thread Alex Olssen
Peter said "Ahem! You might get us interested in your problem, but not to the level that we are going to install Stata and Tsp and actually dig out and study the scientific paper you are talking about. Please cite the results and explain the differences." Apologies Peter, will do, The results wh

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-09 Thread peter dalgaard
On May 9, 2011, at 06:07 , Alex Olssen wrote: > Thank you all for your input. > > Unfortunately my problem is not yet resolved. Before I respond to > individual comments I make a clarification: > > In Stata, using the same likelihood function as above, I can reproduce > EXACTLY (to 3 decimal p

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-08 Thread Alex Olssen
Thank you all for your input. Unfortunately my problem is not yet resolved. Before I respond to individual comments I make a clarification: In Stata, using the same likelihood function as above, I can reproduce EXACTLY (to 3 decimal places or more, which is exactly considering I am using differe

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-07 Thread peter dalgaard
On May 7, 2011, at 17:51 , Ravi Varadhan wrote: > There is something strange in this problem. I think the log-likelihood is > incorrect. See the results below from "optimx". You can get much larger > log-likelihood values than for the exact solution that Peter provided. > > ## model 18 > ln

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-07 Thread Ravi Varadhan
TRUE, y1=y1, y2=y2, + x1=x1, x2=x2, x3=x3, control=list(all.methods=TRUE, maxit=1500)) Ravi. From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of peter dalgaard [pda...@gmail.com] Sent: Saturday, May 07, 2011 4:46 AM To: Alex

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-07 Thread peter dalgaard
On May 6, 2011, at 14:29 , Alex Olssen wrote: > Dear R-help, > > I am trying to reproduce some results presented in a paper by Anderson > and Blundell in 1982 in Econometrica using R. > The estimation I want to reproduce concerns maximum likelihood > estimation of a singular equation system. > I

[R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-06 Thread Alex Olssen
Dear R-help, I am trying to reproduce some results presented in a paper by Anderson and Blundell in 1982 in Econometrica using R. The estimation I want to reproduce concerns maximum likelihood estimation of a singular equation system. I can estimate the static model successfully in Stata but for t

Re: [R] maximum likelihood accuracy - comparison with Stata

2011-03-30 Thread Arne Henningsen
On 28 March 2011 17:08, Peter Ehlers wrote: > On 2011-03-27 21:37, Alex Olssen wrote: >> >> 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 happeni

Re: [R] maximum likelihood accuracy - comparison with Stata

2011-03-28 Thread John C Frain
Are you sure that 1.78 is not the estimate of sigma and 3.14 the estimate of sigma^2. Best Regards John On Monday, 28 March 2011, Peter Ehlers wrote: > On 2011-03-27 21:37, Alex Olssen wrote: > > Hi everyone, > > I am looking to do some manual maximum likelihood estimation in R.  I > have done

Re: [R] maximum likelihood accuracy - comparison with Stata

2011-03-28 Thread Peter Ehlers
On 2011-03-27 21:37, Alex Olssen wrote: 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

[R] maximum likelihood accuracy - comparison with Stata

2011-03-27 Thread Alex Olssen
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

[R] maximum likelihood classifier

2011-02-10 Thread Víctor Rodríguez Galiano
Hello, I am interested in classifying some data using a maximum likelihood classifer. Does anybody know a package which include this classifier? Thanks [[alternative HTML version deleted]] __ R-help@

Re: [R] maximum likelihood problem

2010-10-02 Thread Prof. John C Nash
optimize. John Nash Message: 81 Date: Fri, 1 Oct 2010 16:39:58 -0400 (EDT) From: mlar...@rsmas.miami.edu To: r-help@r-project.org Subject: [R] maximum likelihood problem Message-ID: <3675.129.171.104.122.1285965598.squir...@webmail.rsmas.miami.edu> Content-Type: text/plain;cha

Re: [R] maximum likelihood problem

2010-10-02 Thread Dennis Murphy
Hi: Is equation written as a function? As in, say, eq <- function(k) 1/LR - (exp(-k * T) * LM) * (1 - exp(-k)) I believe the log of the likelihood would be a simpler expression to maximize... On Fri, Oct 1, 2010 at 1:39 PM, wrote: > I am trying to figure out how to run maximum likelihood in

Re: [R] maximum likelihood problem

2010-10-01 Thread Ravi Varadhan
(minimize) that function. Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of mlar...@rsmas.miami.edu Sent: Friday, October 01, 2010 4:40 PM To: r-help@r-project.org Subject: [R] maximum likelihood problem I am trying to figure out how

[R] maximum likelihood problem

2010-10-01 Thread mlarkin
I am trying to figure out how to run maximum likelihood in R. Here is my situation: I have the following equation: equation<-(1/LR-(exp(-k*T)*LM)*(1-exp(-k))) LR, T, and LM are vectors of data. I want to R to change the value of k to maximize the value of equation. My attempts at optim and opt

[R] Maximum likelihood estimation in R

2010-07-19 Thread Maomao Luo
Dear R-helper, I am trying to do maximum likelihood estimation in R. I use the "optim" function. Since I have no prior information on the true values of the parameters, I just randomly select different sets of starting values to feed into the program. Each time, I get the following error

Re: [R] Maximum Likelihood Estimation in R

2010-04-22 Thread Henkep
Thank you! Best Regards Henrik -- View this message in context: http://r.789695.n4.nabble.com/Maximum-Likelihood-Estimation-in-R-tp2018822p2022832.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list h

Re: [R] Maximum Likelihood Estimation in R

2010-04-22 Thread Henkep
Abhishek: Thank you! Thomas: that worked out well, thank you again! I also tried to use lm, and as expected in this case, I almost got the same estimates of the parameters as in the MLE-case. Best Regards Henrik -- View this message in context: http://r.789695.n4.nabble.com/Maximum-L

Re: [R] Maximum Likelihood Estimation in R

2010-04-22 Thread Henkep
that worked out well, thank you again! I also tried to use lm, and as expected in this case, I almost got the same estimates of the parameters as in the MLE-case. Best Regards Henrik -- View this message in context: http://r.789695.n4.nabble.com/Maximum-Likelihood-Estimation-in-R-tp201882

Re: [R] Maximum Likelihood Estimation in R

2010-04-21 Thread Thomas Stewart
Henrik- A coding solutions may be ... + (1/(2*stdev*stdev))*sum( ( y-(rev/12)- c(0,y[-n]) *exp(-lap/12) )^2 ) where n is the number of observations in y. Personally, I would use lm. Your model can be written as a linear function. Let x=c(0,y[-n]). Then run lm(y~x). The parameter estimat

Re: [R] Maximum Likelihood Estimation in R

2010-04-21 Thread Henkep
Thank you Thomas. (a) an embarrassing mistake by me. Of course it should be squared. Thank you for pointing that out. (b) Do you possibly have any suggestions on how to solve this issue? I presume that there is no reason in trying to create a lagged "vector" manually? Best Regards Henrik --

Re: [R] Maximum Likelihood Estimation in R

2010-04-21 Thread Abhishek Pratap
Hey Henrik I dont do MLE myself but this recent blog might be helpful. http://www.johnmyleswhite.com/notebook/2010/04/21/doing-maximum-likelihood-estimation-by-hand-in-r/ -A On Wed, Apr 21, 2010 at 10:02 AM, Thomas Stewart wrote: > Two possible problems: > > (a) If you're working with a normal

[R] Maximum Likelihood in R

2010-04-21 Thread Henkep
Dear R-Help, my name is Henrik and I am currently trying to solve a Maximum Likelihood optimization problem in R. Below you can find the output from R, when I use the "BFGS" method: The problem is that the parameters that I get are very unreasonable, I would expect the absolute value of each p

Re: [R] Maximum Likelihood Estimation in R

2010-04-21 Thread Thomas Stewart
Two possible problems: (a) If you're working with a normal likelihood---and it seems that you are---the exponent should be squared. As in: ... + (1/(2*stdev*stdev))*sum( ( y-(rev/12)-lag(y)*exp(-lap/12) )^2 ) (b) lag may not be working like you think it should. Consider this silly example: y<

[R] Maximum Likelihood Estimation in R

2010-04-21 Thread Henkep
Dear R-Help, I also send the following post by e-mail to you, however I try to post it here aswell. My name is Henrik and I am currently trying to solve a Maximum Likelihood optimization problem in R. Below you can find the output from R, when I use the "BFGS" method: The problem is that the p

[R] Maximum Likelihood Estimation

2009-11-04 Thread Prof. John C Nash
data, I'll be willing to try it out. JN > Message: 84 > Date: Tue, 3 Nov 2009 19:49:17 +0000 > From: Andre Barbosa Oliveira > Subject: [R] Maximum Likelihood Estimation > To: > Message-ID: > Content-Type: text/plain > > > Hi, > > I would like estim

[R] Maximum Likelihood Estimation

2009-11-03 Thread Andre Barbosa Oliveira
Hi, I would like estimate a model for function of production's Coob-Douglas using maximum likelihood. The model is log(Y)= beta[1]+beta[2]*log(L)+beta[3]*log(K). I tried estimate this model using the tools nlm ( ) and optim ( ) using the log-likelihood function below: > mloglik <- fu

Re: [R] Maximum likelihood estimation of parameters make no biological sense

2009-09-24 Thread dave fournier
Hi, Your results are do to using an unstable parameterization of the Von Bertalanffy growth curve, combined with the unreliable optimization methods supplied with R. I coded up your model in AD Model Builder which supplies exact derivatives through AD. I used your starting values and ran the mo

[R] Maximum likelihood estimation of parameters make no biological sense

2009-09-24 Thread Luis Ridao Cruz
R-help, I'm trying to estimate some parameters using the Maximum Likehood method. The model describes fish growth using a sigmoidal-type of curve: fn_w <- function(params) { Winf <- params[1] k <- params[2] t0 <- params[3] b <- params[4]

Re: [R] Maximum Likelihood Est. regarding the degree of freedom of a multivariate skew-t copula

2009-09-23 Thread Ravi Varadhan
, September 23, 2009 7:17 AM To: r-help@r-project.org Subject: [R] Maximum Likelihood Est. regarding the degree of freedom of a multivariate skew-t copula Hello, I have a bigger problem in calculating the Maximum Likelihood Estimator regarding the degree of freedom of a multivariate skew-t copula

Re: [R] maximum likelihood with constraints in R

2008-10-01 Thread Ben Bolker
Plat, H.J. uva.nl> writes: > There is lots of information about maximum likelihood estimation in R. > However, I didn't came across anything about maximum likelihood > with constraints. > For example, estimation of parameters k(1) to k(20) with > maximum likelihood, where sum(k(i)) = 0. If the

[R] maximum likelihood with constraints in R

2008-10-01 Thread Plat, H.J.
Hi R-experts, There is lots of information about maximum likelihood estimation in R. However, I didn't came across anything about maximum likelihood with constraints. For example, estimation of parameters k(1) to k(20) with maximum likelihood, where sum(k(i)) = 0. Is there any standard functi

[R] maximum likelihood

2008-09-25 Thread Jurica Brajković
Hello, I am trying to estimate parameters of mean reverting process with jumps given by: dp=k(mu-p)dt+sigma*dz+Jdq where dp represents change in log of price, k is reversion factor, mu is long run level of price, sigma is standard deviation, and dq equals one with probability lambda if jump oc

[R] Maximum likelihood estimation of a truncated regression model

2008-09-16 Thread Srinivasan Parthasarathy
Hi, I have a quick question regarding estimation of a truncation regression model (truncated above at 1) using MLE in R. I will be most grateful to you if you can help me out. The model is linear and the relationship is "dhat = bhat0+Z*bhat+e", where dhat is the dependent variable >0 and upper tr

Re: [R] Maximum likelihood estimation

2008-09-05 Thread Ravi Varadhan
.edu/agingandhealth/People/Faculty/Varadhan.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of toh Sent: Thursday, September 04, 2008 9:15 PM To: r-help@r-project.org Subject:

Re: [R] Maximum likelihood estimation

2008-09-04 Thread toh
Yes I'm trying to optimize the parameters a, b, p and lambda where a > 0, b > 0 and 0 < p < 1. I attached the error message that I got when I run mle. > t <- c(1:90) > y <- > c(5,10,15,20,26,34,36,43,47,49,80,84,108,157,171,183,191,200,204,211,217,226,230, + 234,236,240,243,252,254,259,263,264,

Re: [R] Maximum likelihood estimation

2008-09-04 Thread Prof Brian Ripley
From ?optim fn: A function to be minimized (or maximized), with first argument the vector of parameters over which minimization is to take place. It should return a scalar result. I think you intended to optimize over c(a,b,p, lambda), so you need to specify them as

[R] Maximum likelihood estimation

2008-09-04 Thread toh
Hi R-experts, I'm new to R in mle. I tried to do the following but just couldn't get it right. Hope someone can point out the mistakes. thanks a lot. t <- c(1:90) y <- c(5,10,15,20,26,34,36,43,47,49,80,84,108,157,171,183,191,200,204,211,217,226,230, 234,236,240,243,252,254,259,263,264,268,271,27

Re: [R] Maximum likelihood estimation

2008-08-15 Thread Peter Dalgaard
Jurica Brajković wrote: > 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. > > C

[R] Maximum likelihood estimation

2008-08-12 Thread Jurica Brajković
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

Re: [R] maximum likelihood method to fit a model

2008-07-23 Thread Peter Dalgaard
silvia narduzzi wrote: Dear R users, I use the glm() function to fit a generalized linear model with gamma distribution function and log link. I have read in the help page that the default method used by R is "glm.fit" (iteratively reweighted least squares, IWLS). Is it possible to use maximum

Re: [R] maximum likelihood method to fit a model

2008-07-23 Thread Patrizio Frederic
dear Silvia, quoting Venables WN and Ripley DB (1994) Modern Applied Statistics with S-plus, sringer, pag 185: "Since explicit expressions for the maximum likelihood estimators are not usually available estimates MUST be calculate iteratively" means that glm.fit performs MLE indirectly and effici

Re: [R] maximum likelihood method to fit a model

2008-07-23 Thread Prof Brian Ripley
On Wed, 23 Jul 2008, silvia narduzzi wrote: Dear R users, I use the glm() function to fit a generalized linear model with gamma distribution function and log link. I have read in the help page that the default method used by R is "glm.fit" (iteratively reweighted least squares, IWLS). Is it

[R] maximum likelihood method to fit a model

2008-07-23 Thread silvia narduzzi
Dear R users, I use the glm() function to fit a generalized linear model with gamma distribution function and log link. I have read in the help page that the default method used by R is "glm.fit" (iteratively reweighted least squares, IWLS). Is it possible to use maximum likelihood method? Than

Re: [R] Maximum Likelihood Estimation

2008-06-18 Thread Ben Bolker
Todd Brauer yahoo.com> writes: > > Using R, I would like to calculate algorithms to estimate coefficients á and â within the gamma function: > f(costij)=((costij)^á)*exp(â*costij).  I have its logarithmic diminishing line data > (Logarithmic Diminishing Line Data Table) and have installed R¢s Ma

[R] Maximum Likelihood Estimation

2008-06-18 Thread Todd Brauer
Using R, I would like to calculate algorithms to estimate coefficients á and â within the gamma function: f(costij)=((costij)^á)*exp(â*costij).  I have its logarithmic diminishing line data (Logarithmic Diminishing Line Data Table) and have installed R¢s Maximum Likelihood Estimation package; ho

Re: [R] Maximum likelihood estimation in R with censored Data

2008-06-15 Thread Thomas Lumley
Try survreg(), in the survival package. -thomas On Fri, 13 Jun 2008, Bluder Olivia wrote: Hello, I'm trying to calculate the Maximum likelihood estimators for a dataset which contains censored data. I started by using the function "nlm", but isn't there a separate method for doing

Re: [R] Maximum likelihood estimation in R with censored Data

2008-06-13 Thread Vincent Goulet
Le ven. 13 juin à 13:55, Ben Bolker a écrit : Bluder Olivia k-ai.at> writes: Hello, I'm trying to calculate the Maximum likelihood estimators for a dataset which contains censored data. I started by using the function "nlm", but isn't there a separate method for doing this for e.g. t

Re: [R] Maximum likelihood estimation in R with censored Data

2008-06-13 Thread Ben Bolker
Bluder Olivia k-ai.at> writes: > > Hello, > > I'm trying to calculate the Maximum likelihood estimators for a dataset > which contains censored data. > > I started by using the function "nlm", but isn't there a separate method > for doing this for e.g. the "weibull" and the "log-normal" distri

[R] Maximum likelihood estimation in R with censored Data

2008-06-13 Thread Bluder Olivia
Hello, I'm trying to calculate the Maximum likelihood estimators for a dataset which contains censored data. I started by using the function "nlm", but isn't there a separate method for doing this for e.g. the "weibull" and the "log-normal" distribution? Thanks, Olivia [[a