Learn R Programming

degreenet (version 1.3-6)

llpln: Calculate the Conditional log-likelihood for the Poisson Lognormal Distributions

Description

Compute the Conditional Log-likelihood for the Poisson Lognormal Discrete Probability Distribution. The likelihood is calculated conditionl on the count being at least the cutoff value and less than or equal to the cutabove value.

Usage

llpln(v, x, cutoff=1,cutabove=1000,xr=1:10000,hellinger=FALSE,logn = TRUE)

Value

the log-likelihood for the data x at parameter value v

(or the Hellinder distance if hellinger=TRUE).

Arguments

v

A vector of parameters for the Yule (a 1-vector - the scaling exponent).

x

A vector of counts (one per observation).

cutoff

Calculate estimates conditional on exceeding this value.

cutabove

Calculate estimates conditional on not exceeding this value.

xr

range of count values to use to approximate the set of all realistic counts.

hellinger

Calculate the Hellinger distance of the parametric model from the data instead of the log-likelihood?

logn

Use logn parametrization, that is, mean and variance on the observation scale.

References

Jones, J. H. and Handcock, M. S. "An assessment of preferential attachment as a mechanism for human sexual network formation," Proceedings of the Royal Society, B, 2003, 270, 1123-1128.

See Also

aplnmle, llplnall, dpln

Examples

Run this code

# Simulate a Poisson Lognormal distribution over 100
# observations with lognormal mean -1 and logormal standard deviation 1.

set.seed(1)
s4 <- simpln(n=100, v=c(-1,1))
table(s4)

#
# Calculate the MLE and an asymptotic confidence
# interval for rho
#

s4est <- aplnmle(s4)
s4est

#
# Calculate the MLE and an asymptotic confidence
# interval for rho under the Waring model
#

s4warest <- awarmle(s4)
s4warest

#
# Compare the log-likelihoods for the two models
#

llpln(v=s4est$theta,x=s4)
llwar(v=s4warest$theta,x=s4)

Run the code above in your browser using DataLab