Learn R Programming

GPseq (version 0.5)

generalized_poisson_likelihood: Maximum Likelihood Estimates for the Generalized Poisson Model

Description

This function calculates the Maximum Likelihood estimates for theta and lambda when vector y is fit to the Generalized Poisson Model. Newton Raphson Method is employed to calculate the MLE. The values are only valid if the Newton Raphson Method converges.

Usage

generalized_poisson_likelihood(y)

Arguments

y
Vector of counts.

Value

mark
1 if the Newton Raphson Method converges. If mark = 0, then the values of theta and lambda are not applicable
theta
Maximum Likelihood Estimate for theta in the Generalized Poisson Model(theta,lambda)
lambda
Maximum Likelihood Estimate for lambda in the Generalized Poisson Model(theta,lambda)
y_bar
Mean of y which is also the Maximum Likelihood Estimate for lambda for the Poisson model
length
Length of y which will be later used to calculate the normalization values

References

Consul, P. C. (1989) Generalized Poisson Distributions: Properties and Applications. New York: Marcel Dekker. Sudeep Srivastava, Liang Chen A two-parameter generalized Poisson model to improve the analysis of RNA-Seq data Nucleic Acids Research Advance Access published July 29,2010 doi : 10.1093/nar/gkq670

Examples

Run this code
y = rpois(100,10);
out = generalized_poisson_likelihood(y);
#Check if it converged
if(out$mark==1)
{
#Value of Theta
  cat("theta = ",out$theta,"lambda = ",out$lambda,"lambda_poisson = ",out$y_bar,"Length = ",out$length,"\n");
}

Run the code above in your browser using DataLab