search for: mles

Displaying 20 results from an estimated 53 matches for "mles".

Did you mean: mes
2007 Jul 21
1
Gamma MLE
Hello, I was asked to try the following code on R, gamma.mles function (xx,shape0,rate0) { n<- length(xx) xbar<- mean(xx) logxbar<- mean(log(xx)) theta<-c(shape0,rate0) repeat { theta0<- theta shape<- theta0[1] rate<- theta0[2] S<- n*matrix(c(log(rate)-digamma(shape)+logxbar,shape/rate-xbar),ncol=1) I<- n*matrix(c(trigamma(shape),-1...
2012 Aug 02
1
finding the MLEs of IG parameters by EM-Alorithm
Dear all I'm trying to caculate the MLEs for parameters of Inverse Gaussian distribution (in a k-sample problem with common mean) by using EM-Algorithm. I found some package for EM-Algorithm that are useful for missing or incomplete data and are not helpful for solving my problem. (Exactly, the problem is: Let Xij, i=1,..,k , j=1,...,ni,...
2012 Feb 06
1
MLEs using optim
I am trying to use the optim command to get the MLEs for a number of parameters based on some data. Is it possible to write a program that maximizes the likelihood and stores the parameters (many times)? I need to do this a lot of times, each time the data will be updated with more entries (rows). I need to see how the new data is affecting the previ...
2009 Dec 10
1
MLE for a t distribution
Given X1,...,Xn ~ t_k(mu,sigma) student t distribution with k degrees of freedom, mean mu and standard deviation sigma, I want to obtain the MLEs of the three parameters (mu, sigma and k). When I try traditional optimization techniques I don't find the MLEs. Usually I just get k->infty. Does anybody know of any algorithms/functions in R that can help me obtain the MLEs? I am especially interested in the MLE for k, the degrees of freed...
2006 Aug 24
1
Optim question
This is a very basic question, but I am a bit confused with optim. I want to get the MLEs using optim which could replace the newton-raphson code I have below which also gives the MLEs. The function takes as input a vector x denoting whether a respondent answered an item correctly (x=1) or not (x=0). It also takes as input a vector b_vector, and these are parameters of test items (Rasch...
2006 May 15
1
Fitting usual distributions.
Hello, I am currently writing a program whose goal is to fit usual distributions (estimating parameters and confidence intervals for a given distribution). After some research in R, R-help and google I have found most of what I was looking for (especially thanks to MASS - fitdistr() ), however there are still a few distributions I could not find R code for: Multinormal, Truncated normal,
2008 May 16
0
How to determine sensible values for 'fnscale' and 'parscale' in optim
...use 'fnscale'. But how much should I scale? The same applies to 'parscale'. How do I termine reasonable values? To make the question a bit less theoretical, how would one go about choosing good values of 'fnscale' and 'parscale' to use when finding, for example, the MLEs of a bivariate normal distribution using optim. Here's code for this example: ----------------------------------------------- library(MASS) # needed mvrnorm library(mvtnorm) # needed for dmvnorm set.sed(20080516) n=1000 mu1=3 mu2=5 sig1=7 sig2=20 rho=.5 sigmat=matrix(c(sig1^2,sig1*sig2*rho,s...
2010 Jun 17
2
Pretty printing progress
I have a function that is an iterative process for estimating some MLEs. I want to print some progress to screen as the process iterates. I would like to try and line things up nicely in the R window, but am not sure the best way to do this. Below is a toy example. Suppose I want the value of 10 to be just below "iteration" and the value of -1234 to be just b...
2008 Jun 24
1
Hessian in box-constraint problem - concern OPTIM function
Hello all useRs, I am using the OPTIM function with particular interest in the method L-BFGS-B, because it is a box-constraint method. I have interest in the errors estimates too. I make: s.e. <- sqrt( diag( solve( optim(...,method='L-BFGS-B', hessian=TRUE)$hessian ))) but in help say: "Note that this is the Hessian of the unconstrained problem even if the box constraints
2009 Feb 26
13
o2dlm mle hash patches - round 2
The changes from the last drop are: 1. Patch 11 removes struct dlm_lock_name. 2. Patch 12 is an unrelated bugfix. Actually is related to a bugfix that we are retracting in mainline currently. The patch may need more testing. While I did hit the condition in my testing, Marcos hasn't. I am sending it because it can be queued for 2.6.30. Give us more time to test. 3. Patch 13 will be useful
2010 Feb 12
1
validate (rms package) using step instead of fastbw
Dear All, For logistic regression models: is it possible to use validate (rms package) to compute bias-corrected AUC, but have variable selection with AIC use step (or stepAIC, from MASS), instead of fastbw? More details: I've been using the validate function (in the rms package, by Frank Harrell) to obtain, among other things, bootstrap bias-corrected estimates of the AUC, when variable
2009 Feb 03
10
Convert mle list to a hash
These patches convert the mle list to a hash. The same patches apply on ocfs2 1.4 too. Currently, we use the same number of hash pages for mles and lockres'. This will be addressed in a future patch that will make both of them configurable. Sunil
2005 Jul 03
1
Symbolic Maximum Likelihood in R
Dear List: Is any one aware of a package that would extend the D() function and allow for one to maximize a likelihood function symbolically? Something akin to Solve[x==0, parameter] function in Mathematica? Clearly R has the capacity to _compute_ MLEs given a set of data. But, I'm looking for a package that would allow for me to define the likelihood function, find the 1st order partial derivative of this function (which can already be handled in D()), and then symbolically maximize this function? -Harold [[alternative HTML versio...
2005 Jul 10
1
O/T -2 Log Lambda and Chi Square
Hi R People: Sorry about the off topic question. Does anyone know the reference for "-2 Log Lambda is approx dist. Chi square", please? It may be Bartlett, but I'm not sure.... thanks in advance! Sincerely, Laura Holt mailto: holtlaura at gmail.com
2010 May 07
2
problem in using optim
Dear R users, When I was trying to use the function *optim* to get the MLEs, quite a few warning messages showed up as below: Warning in log(psi * lam) : NaNs produced I am just wondering what does this mean? Was it something wrong with my likelihood function or was it sth wrong with the data? Thanks in advance. Carol Gao [[alternative HTML version deleted]]
2005 Apr 11
1
TSeries GARCH Estimates accuracy
...ancial timeseries using the 'garch' function in the tseries package. However the parameter estimates obtained sometimes match with those obtained using SAS or S-Plus (Finmetrics) and sometimes show a completely different result. I understand that this could be due to the way optimization of MLEs are done, however, I would appreciate any help to obtain consistent results using R. Also is there any garch simulation function available other than garchSim from fseries package? Thanks in advance, Sanjay
2012 Oct 29
2
Two-way Random Effects with unbalanced data
...ed setup, this is much more complicated because orthogonality relations no longer exist between "row space" and "column space". Since the covariance structure between the cell means y_{ij.} is much more complicated than in the one-way (unbalanced) case, trying to manually obtain MLEs looks very difficult. I couldn't find anything addressing point estimates for the unbalanced case - neither in the literature nor in a computer program (R or alike). Any idea will be greatly appreciated... Thank you, Asaf -- View this message in context: http://r.789695.n4.nabble.com/Two...
2008 Feb 15
1
Questions about EM algorithm
Dear all: Assume I have 3 distributions, x1, x2, and x3. x1 ~ normal(mu1, sd1) x2 ~ normal(mu2, sd2) x3 ~ normal(mu3, sd3) y1 = x1 + x2 y2 = x1 + x3 Now that the data I can observed is only y1 and y2. It is easy to estimate (mu1+m2), (mu1+mu3), (sd1^2+sd2^2) and (sd1^2+sd3^2) by EM algorithm since y1 ~ normal(mu1+mu2, sqrt(sd1^2+sd2^2)) and y2 ~ normal(mu1+mu3, sqrt(sd1^2+sd3^2)) However, I want
2006 Sep 26
1
warning message in nlm
Dear R-users, I am trying to find the MLEs for a loglikelihood function (loglikcs39) and tried using both optim and nlm. fredcs39<-function(b1,b2,x){return(exp(b1+b2*x))} loglikcs39<-function(theta,len){ sum(mcs39[1:len]*fredcs39(theta[1],theta[2],c(8:(7+len))) - pcs39[1:len] * log(fredcs39(theta[1],theta[2],c(8:(7+len))))) } theta.s...
2009 Apr 17
26
OCFS2 1.4: Patches backported from mainline
Please review the list of patches being applied to the ocfs2 1.4 tree. All patches list the mainline commit hash. Thanks Sunil