Skip to contents

Returns the mixture curve \(A(a) = \sum_g \pi_g \lambda_g(a)\) and, with it, the one-type population that produces the identical aggregate (Research.P6.aggregate_not_identifying): the aggregate curve alone cannot tell how many types there are or what their curves look like, which is why an invariant aggregate curve is not evidence for invariance at the individual level (Research.P6.invariance_not_necessary).

Usage

morie_age_crime_aggregate(shares, curves, ages = NULL)

Arguments

shares

Type shares, summing to 1.

curves

Matrix with one column per type and one row per age.

ages

Optional age labels for the rows.

Value

A data frame with age, aggregate, and one column per type curve; attribute "equivalent_single_type" holds the one-type curve with the same aggregate.

Examples

ages <- 10:60
early <- dgamma(ages - 9, shape = 3, rate = 0.5) * 40
late <- dgamma(ages - 9, shape = 8, rate = 0.35) * 40
morie_age_crime_aggregate(c(0.5, 0.5), cbind(early, late), ages)[1:5, ]
#>   age aggregate    early         late
#> 1  10  0.758164 1.516327 1.259420e-06
#> 2  11  1.839454 3.678794 1.135998e-04
#> 3  12  2.510898 5.020429 1.367771e-03
#> 4  13  2.710316 5.413411 7.220736e-03
#> 5  14  2.577288 5.130312 2.426322e-02