Description Usage Arguments Value Examples
Create reports cases after listwise deletion of missing values for time-series cross-sectional data.
1 | CasesTable(data, GroupVar, TimeVar, Vars)
|
data |
a data frame with the full sample. |
GroupVar |
a character string specifying the variable in |
TimeVar |
an optional character string specifying the variable in
|
Vars |
a character vector with variables names from |
If TimeVar
is specified then a data frame is returned with
three colums. One identifying the GroupVar
and two others specifying
each unique value of GroupVar
's first and last observation time
post-listwise deletion of missing values.
If TimeVar
is not specified, then a vector of unique GroupVar
post-listwise deletion of missing values is returned.
1 2 3 4 5 6 7 8 9 10 11 | # Create dummy data
ID <- rep(1:4, 4)
time <- rep(2000:2003, 4)
a <- rep(c(1:3, NA), 4)
b <- rep(c(1, NA, 3:4), 4)
Data <- data.frame(ID, time, a, b)
# Find cases that have not been listwise deleted
CasesTable(Data, GroupVar = 'ID')
CasesTable(Data, GroupVar = 'ID', Vars = 'a')
CasesTable(Data, GroupVar = 'ID', TimeVar = 'time', Vars = 'a')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.