llgyule: Calculate the Conditional log-likelihood for Count...

Description Usage Arguments Value Note References See Also Examples

Description

Functions to Estimate the Conditional Log-likelihood for Discrete Probability Distributions. The likelihood is calcualted condition on the count being at least the cutoff value and less than or equal to the cutabove value.

Usage

1
llgyule(v, x, cutoff=1,cutabove=1000,xr=1:10000,hellinger=FALSE)

Arguments

v

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

x

A vector of categories for counts (one per observation). The values of x and the categories are: 0=0, 1=1, 2=2, 3=3, 4=4, 5=5-10, 6=11-20, 7=21-100, 8=>100

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?

Value

the log-likelihood for the data x at parameter value v (or the Hellinder distance if hellinger=TRUE).

Note

See the working papers on http://www.csss.washington.edu/Papers for details

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

gyulemle, llgyuleall, dyule

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#
# Simulate a Yule distribution over 100
# observations with rho=4.0
#

set.seed(1)
s4 <- simyule(n=100, rho=4)
table(s4)

#
# Recode it as categorical
#

s4[s4 >  4 & s4 < 11] <- 5
s4[s4 > 100] <- 8
s4[s4 >  20] <- 7
s4[s4 >  10] <- 6

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

s4est <- gyulemle(s4)
s4est

#
# Calculate the MLE and an asymptotic confidence
# interval for rho under the Waring model (i.e., rho=4, p=2/3)
#

s4warest <- gwarmle(s4)
s4warest

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

llgyule(v=s4est$theta,x=s4)
llgwar(v=s4warest$theta,x=s4)

degreenet documentation built on May 1, 2019, 8:08 p.m.