similar to: Computing Maximum Loglikelihood With "nlm" Problem

Displaying 20 results from an estimated 200 matches similar to: "Computing Maximum Loglikelihood With "nlm" Problem"

2008 May 21
2
Converting Data Types
Hi, How can I convert the matrices to list. For example I have this snippet: samples<-mymatrix[1,] print(samples) which prints: V1 V2 V3 V4 V5 V6 1 103.9 88.5 242.9 206.6 175.7 164.4 How can I convert the object "samples" such that it prints: [1] 103.9 88.5 242.9 206.6 175.7 164.4 The reason I ask this because I can't use the former "samples"
2008 May 23
0
Est. Component Size with AIC/BIC under Gamma Distribution
Dear all, I am trying to model number of samples from a given series. The series are modelled according Gamma function. In order to estimate the # samples, I use BIC/AIC with MLE (computed from dgamma function). Here is the code I have. __BEGIN__ mlogl <- function( x_func, theta_func, samp) { # computing log_likelihood return( - sum(dgamma(samp, shape = x_func, scale=theta_func, log
2008 May 23
2
About Passing Arguments to Function
Hi, Below I have a function mlogl_k, later it's called with "nlm" . __BEGIN__ vsamples<- c(14.7, 18.8, 14, 15.9, 9.7, 12.8) mlogl_k <- function( k_func, x_func, theta_func, samp) { tot_mll <- 0 for (comp in 1:k_func) { curr_mll <- (- sum(dgamma(samp, shape = x_func, scale=theta_func, log = TRUE))) tot_mll <- tot_mll + curr_mll }
2008 May 23
1
maximizing the gamma likelihood
for learning purposes and also to help someone, i used roger peng's document to get the mle's of the gamma where the gamma is defined as f(y_i) = (1/gammafunction(shape)) * (scale^shape) * (y_i^(shape-1)) * exp(-scale*y_i) ( i'm defining the scale as lambda rather than 1/lambda. various books define it differently ). i found the likelihood to be n*shape*log(scale) +
2009 Jun 19
1
a difficulty in boot package
Hi, I have a problem in programming for bootstrapping. I don't know why it show the error message. Please see my code below: #'st' is my original dataset. #functions of 'fml.mlogl','pcopula.fam4','ltd','invltd' are already defined boot.OR<-function(data,i) { E=data[i,] ml1<-glm(c_VAsex90_bf ~ trt,family=binomial,data=E) ml2<-glm(c_VAsex90_bm ~
2007 Apr 18
3
Problems in programming a simple likelihood
As part of carrying out a complicated maximum likelihood estimation, I am trying to learn to program likelihoods in R. I started with a simple probit model but am unable to get the code to work. Any help or suggestions are most welcome. I give my code below: ************************************ mlogl <- function(mu, y, X) { n <- nrow(X) zeta <- X%*%mu llik <- 0 for (i in 1:n) { if
2007 Jul 18
2
maximum likelihood estimation
Hello! I need to perform maximum likelihood estimation on R, but I am not sure which command to use. I searched on google, and found an example using the function mlogl, but I couldn't find the package on R. Is there such function? Or how should i perform my mle? Thank you very much. -- View this message in context:
2009 Jan 18
1
about power.law.fit
Dear all, I'm using igraph for some analysis about the network I have. I have a question about the function "power.law.fit". I wonder if there is any test for checking whether the "power.law.fit" is good for the input, i.e., under which situation, could we use this function to get a reliable result. I'm afraid even I input a random graph without any property of
2006 Feb 15
1
power law
Dear list, Does anyone know how to fit the power law distribution? I have the empirical distribution and would like to check whether it fits power law (with the power estimated from the data). Any hints are appreciated Best regards Galina [[alternative HTML version deleted]]
2011 Jan 16
2
xyplot: modify axis tick marks
Hi, I would like to plot time against rainfall data (data is at the end) using xyplot. The basic code looks like this: xyplot(rainfall~time, type="a") When I do this, the graph looks ok except that the x-axis has too many values. I would just like to display the years and not the months on the x-axis. I've been fiddling around with 'scales', and read previous posts about
2011 Aug 30
1
New UPS for Support List
Hi All, I have got the Belkin F6S600auUSB UPS working with the blazer_usb driver. I pulled the power to the ups last night and it sent a message to the server saying it was on battery then ran for another 10 minutes and then sent a message to the server telling it to shut down, which it did. upswr did not return anything. [root at verity ~]# upsc ups battery.voltage: 13.50
2011 Aug 30
1
New UPS for Support List
Hi All, I have got the Belkin F6S600auUSB UPS working with the blazer_usb driver. I pulled the power to the ups last night and it sent a message to the server saying it was on battery then ran for another 10 minutes and then sent a message to the server telling it to shut down, which it did. upswr did not return anything. [root at verity ~]# upsc ups battery.voltage: 13.50
2015 Feb 23
2
Call for testing: OpenSSH 6.8
On Mon, 23 Feb 2015, Kevin Brott wrote: > Hrm - I'll have to run this on one of my linux boxxen and then schlep the > source over - the AIX/HP-UX boxenn have an older version of the autoconf > tools and autoreconf is broken/missing ... and that seems to work. > > Now the build fails here on AIX 6.1/7.1 ... > > xlc_r -O2 -qarch=ppc -qalloca -I/usr/include
2010 Jun 30
1
merge.zoo and fill
Hello again, I merge different zoo time series with prices at different dates. This returns a multivariate zoo object with NA's at various points i.e., 2010-02-28 NA NA NA NA 850.2 2444.4 NA NA NA NA NA NA NA 2010-03-01 61.1 55.3 61.5 81.24 NA NA 1712.2 3.3 11139.3 163.7 2242.4 9015.6 109.791 2010-03-31
2008 Aug 04
2
Howto Smooth a Curve Created with the Point Function
Hi all, I have this figure: http://docs.google.com/Doc?id=df5zfsj4_103rjt2v4d5 created with the following steps: > x [1] 90.4 57.8 77.0 103.7 55.4 217.5 68.1 85.3 152.0 113.0 97.1 89.9 [13] 68.1 83.7 77.4 34.5 104.9 170.3 88.6 88.1 108.8 77.4 85.6 82.7 [25] 81.3 108.0 49.5 71.0 85.7 99.3 203.5 275.9 51.1 84.8 16.5 72.6 [37] 160.5 158.3 136.7 140.0 98.4 116.1
2008 Jul 09
1
Loglikelihood for x factorial?
Hi Rers, I have a silly question. I don't know how to express the loglikelihood function of 1/(x!) where x=x1,x2,....xn in R. Could anyone give me a hint? Thank you in advance. Chunhao Tu
2011 Mar 14
0
nlysystemfit and loglikelihood values
Dear R-help, The documentation for systemfit shows that logLik() can be used to obtain loglikelihood values from linear systems estimated by systemfit(). It seems to me that logLik() cannot be used for nlsystemfit(). Does anyone know of any other packages that might let me obtain the loglikelihood of a model estimated with nlsystemfit()? Kind regards, Alex Olssen
2008 Jul 17
0
How to compute loglikelihood of Lognormal distribution
Hi, I am trying to learn lognormal mixture models with EM. I was wondering how does one compute the log likelihood. The current implementation I have is as follows, which perform really bad in learning the mixture models. __BEGIN__ # compute probably density of lognormal. dens <- function(lambda, theta, k){ temp<-NULL meanl=theta[1:k] sdl=theta[(k+1):(2*k)]
2009 Jun 06
0
loglikelihood and AIC
Hi,  I tried fitting loglinear model using the glm(catspec). The data used is FHtab. . An independence model was fitted. Here summary() and fitmacro( ) give different values for AIC.   I understand that fitmacro( ) takes the likelilhood ratio L2(deviance) to calculate AIC and uses the formula AIC= L2- d.f(deviance)*2 and this AIC is used for comparison of nested models. (Am I right?)   The value
2009 Oct 27
1
Poisson dpois value is too small for double precision thus corrupts loglikelihood
Hi - I have a likelihood function that involves sums of two possions: L = a*dpois(Xi,theta1)*dpois(Yi,theta2)+b*(1-c)*a*dpois(Xi,theta1+theta3)*dpois(Yi,theta2) where a,b,c,theta1,theta2,theta3 are parameters to be estimated. (Xi,Yi) are observations. However, Xi and Yi are usually big (> 20000). This causes dpois to returns 0 depending on values of theta1, theta2 and theta3. My first