Description Usage Arguments Details Value
The interpolation is done by age using a linear, exponential, or power
function. This comes from the PAS spreadsheet called AGEINT. Be aware
that this is not cohort-component interpolation.
1 2 3 4 5 6 7 8 9 10 |
popmat |
numeric. An age-period matrix of data to interpolate over. Age in rows, time in columns. |
datesIn |
vector of dates. The exact dates in each column. See details for ways to express it. |
datesOut |
vector of dates. The desired dates to interpolate to. See details for ways to express it. |
method |
string. The method to use for the interpolation, either
|
power |
numeric power to interpolate by, if |
extrap |
logical. In case |
negatives |
logical. In case negative output are accepted, set to
|
... |
arguments passed to |
The age group structure of the output is the same as that of the input.
Ideally, datesOut should be within the range of datesIn. If
not, the left-side and right-side output are held constant outside the range
if rule = 2 is passed in, otherwise NA is returned (see
examples). Dates can be given in three ways 1) a Date class object, 2)
an unambiguous character string in the format "YYYY-MM-DD", or 3) as a
decimal date consisting in the year plus the fraction of the year passed as
of the given date.
For methods "exponential" and "power", calculations are carried
out using linear interpolation through log(popmat), or
popmat^(1/power) respectively, then back-transformed. If the data
contain 0s, method = "exponential" will fail, but "power" would
still generally work.
numeric matrix (age-period) (or vector if length(datesOut) ==
1 of the interpolated data for the requested dates.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.