Description Usage Arguments See Also Examples
Function to extract a sample of observations out of a panel dataset, preserving all time measurements for each sampled observation.
1 |
data |
data frame carrying an |
n |
how many observations to sample |
1 2 3 4 5 6 | # Load QOG demo datasets.
data(qog.demo)
# Random sample of ten QOG countries.
unique(xtsample(qog.ts.demo, 10)$cname)
# Random cross-section of year 2000.
xtsubset(xtsample(qog.ts.demo, 10), year == 2000)[, 1:5]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.