Description Usage Arguments Details Value Author(s) Examples
Plots state occupancies. It plots the state occupancies (counts in sample or population under observation) as estimated by Occup
. The data are produced by the Occup function.
1 2 |
x |
State occupancies in sample population, by age. An object of class |
namstates.desired |
Desired sequence of states in plot. The argument is used to specify an informative ordering of the state occupancies or state probabilities to be stacked. |
colours |
Colours selected to distinguish the states in the state space. |
title |
title of plot |
area |
logical variable.If area is TRUE, area plot is displayed (using geom_area of ggplot2). If area is FALSE, a bar plot is displayed (using geom_bar of ggplot2) |
xmin |
Minimum age in plot |
xmax |
Maximum age in plot |
... |
Further arguments to plot |
The function uses the ggplot2 package
occup.S |
State occupancies |
plot |
The figure of state occupancies |
Frans Willekens
1 2 3 4 5 6 7 8 9 | data(GLHS)
Bdata.a <- date_b (GLHS,format.out="age",covs=c("marriage","LMentry"))
occup <- Occup(Bdata.a)
dd <- occup$state_occup
t <- "States occupancies. GLHS"
cc <- c("red","green","lightgrey")
xx <- c("N","J","Censored")
z<- plot (x=dd,namstates.desired=xx,colours=cc,title=t,area=TRUE,xmin=10,xmax=55)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.