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.fit
, 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 21 22 | ## Not run:
# Use a simple data set
AU10 <- Inputlx(x = australia_10y$x, lx = australia_10y$lx,
nax = australia_10y$nax, nx = australia_10y$nx, last_open = TRUE)
# 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(AU10$lt$x, control = control.1) #calculate number of raw classes
AU10p.1A <- pclm.fit(AU10, control = control.1)
length(AU10p.1A$pclm$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(AU10$lt$x, control = control.2) #calculate the number of raw classes
AU10p.1B <- pclm.fit(AU10, control = control.2)
length(AU10p.1B$pclm$raw$x) # the number of raw classes after fit
plot(AU10p.1B)
# **** See more examples in the help for pclm.fit() function.
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.