| block_correlation | R Documentation |
Create clustered-period correlation structures
block_correlation(
n_individuals,
n_periods,
within_period,
between_period = 0,
within_individual = NULL,
decay = NULL,
design = c("cross_sectional", "cohort"),
n_clusters = 1L
)
n_individuals |
Individuals per period. Supply one value, one value per cluster, or one value per cluster-period combination. |
n_periods |
Number of periods. |
within_period |
Correlation between different individuals in the same period. |
between_period |
Correlation between different individuals in different periods for an exchangeable structure. |
within_individual |
Correlation for the same individual across periods in a cohort design. |
decay |
Optional period-to-period correlation decay. Supplying this selects a decay structure. |
design |
Cross-sectional or closed-cohort design. |
n_clusters |
Number of cluster-specific structures. |
A base data.frame with one row per cluster and correlation-matrix
cell, and columns row, column, correlation and cluster. The row
and column labels are of the form period_<p>_unit_<u>.
block_correlation(
n_individuals = 3,
n_periods = 4,
within_period = 0.3,
between_period = 0.1,
design = "cross_sectional"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.