Description Usage Arguments Details Value See Also Examples
Converts a numeric series to an index using the first observation as reference.
1 | tsNumToIndex(x, base = 100, reference = 1)
|
x |
Time-indexed data to convert, must be a ts or zoo object. |
base |
(Optional) Default is 100. |
reference |
(Optional) Observation to be used as proportions are calculated. |
If using a monetary series be sure to deflate it before indexing.
Time series (ts or zoo) with the index.
1 2 3 4 | # Production averages 1254 units per month
production <- ts( rnorm(30*12,mean=1254,sd=425),start=c(1980,1),freq=12)
ip <- tsNumToIndex( production ) # industrial production index
ip2 <- tsNumToIndex( production, reference = c(1992,6) ) # rebase for June 1992
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.