Learn R Programming

emg (version 1.0.9)

emg.mle: Maximum Likelihood estimate of parameters

Description

Compute the maximum likelihood model for the parameters given a set of observations. Returns a model with estimates for mu, sigma, and lambda.

Usage

emg.mle(x, lower=NULL, upper=NULL, start=NULL, ...)

Arguments

x

vector of observations to estimate parameters for.

lower

list of lower bounds for parameters.

upper

list of upper bounds for parameters.

start

list of starting parameters for search.

...

optional parameters to pass to `mle`.

Value

An object of class mle-class.

See Also

EMG emg.nllik

Examples

Run this code
# NOT RUN {
  emg.mle(remg(200))
  
  ## a example involving fitting
  data(pc9_3um_erlotinib)

  intermitotic.time <- subset(pc9_3um_erlotinib, end.of.movie=='N' & died=='N')$observed

  hist(intermitotic.time, freq=FALSE, main="PC9 in 3um erlotinib", xlab='intermitotic time (hours)')

  fit <- emg.mle(intermitotic.time)
  pdf <- function(x) demg(x, coef(fit)['mu'], coef(fit)['sigma'], coef(fit)['lambda'])
  curve(pdf, from=0, to=170, add=TRUE, col='red')
# }

Run the code above in your browser using DataLab