search for: minusloglik

Displaying 3 results from an estimated 3 matches for "minusloglik".

Did you mean: minuslogl
2006 Feb 13
2
Sweave, mle and curve
...ing result with the following code, lec4.Snw: \documentclass[a4paper,12pt]{article} \usepackage[latin1]{inputenc} \title{Maximum likelihood} \author{G伱伓ran Brostr伱伓m} \begin{document} \maketitle <<fig=TRUE>>= ## Simulate Y: n <- 25 Y <- sum(rpois(n, lambda = 1)) Y ## Define minusloglik: minusloglik <- function(theta) n * theta - Y * log(theta) curve(minusloglik, 0.2, 2, xlab = "theta") library(stats4) cat("Y is now ", Y, "\n") fit <- mle(minusloglik, start = list(theta = Y/n)) summary(fit) @ \end{document} In R, I get: > Sweave("le...
2011 Apr 28
1
DLSODA error
...- c(3.02, 2.88, 2.91, 2.83, 2.85, 2.88, 2.91, 2.90, 2.94, 3.09, 3.17, 3.14, 3.37, 3.40, 3.50, 3.58, 3.55, 3.70, 3.90, 3.77) c10 <- c(4.39, 4.22, 4.27, 4.21, 4.25, 4.34, 4.47, 4.40, 4.46, 4.64, 4.73, 4.60, 4.87, 4.96, 5.09, 5.10, 5.08, 5.26, 5.54, 5.37) T = 20 #definining -log-likelihood function minusloglik <- function(K_vv, K_rv, K_rr, theta_v, theta_r, Sigma_rv, Sigma_rr, lambda_v, lambda_r){ # #solving ODEs as functions of "parameters" parameters <- c(K_vv, K_rv, K_rr, theta_v, theta_r,...
2013 Mar 05
0
Error message from flexsurvreg
...ous work of my colleagues on similar projects, am trying to estimate an AFT model with a generalized gamma distribution. When I execute the following code: >flexsurvreg(timesurv ~ cycles + rcycle + cyctime, dist="gengamma") I get the following error message: Error in optim(optpars, minusloglik.flexsurv, t = Y[, "time"], dead = Y[, : non-finite finite-difference value [4] I get an almost identical error (a 3 in the brackets instead of a 4) if I use the dist = "weibull". But have no problems when I run survreg with Weibull distribution on the same data. I've s...