Description Usage Arguments Author(s) See Also Examples
Calculate the number of PCLM internal (raw) classes.
1 | pclm.nclasses(x, control = list())
|
x |
Vector with start of the interval for age/time classes. |
control |
List with additional parameters. See |
Maciej J. Danko <danko@demogr.mpg.de> <maciej.danko@gmail.com>
pclm.control
, pclm.interval.multiple
,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
# Use a simple data set
x <- c(0, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
dx <- c(38, 37, 17, 104, 181, 209, 452, 1190, 2436, 3164, 1852, 307, 13)
# Define the open interval by zero.class.frac
control.1 = list(x.div = 5, zero.class.frac = 0.2, zero.class.end = NULL)
pclm.nclasses(x, control = control.1) #calculate number of raw classes
AU10p.1A <- pclm.default(x, dx, control = control.1)
length(AU10p.1A$raw$x) # the number of raw classes after fit
plot(AU10p.1A)
# Define the open interval by zero.class.end
control.2 = list(x.div = 5, zero.class.end = 109)
pclm.nclasses(x, control = control.2) #calculate the number of raw classes
AU10p.1B <- pclm.default(x, dx, control = control.2)
length(AU10p.1B$raw$x) # the number of raw classes after fit
plot(AU10p.1B)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.