Time Series

Description

Plotting the time series for the 1918–1919 influenze epidemic. The plot for the number of cases is in red, and the plot for 10 times the number of deaths is in blue.

To use R in a Sage cell, the language must be set to R. See https://github.com/sagemath/sagecell/blob/master/doc/embedding.rst for details.

Sage Cell

Options

cases <- c(36, 531, 4233, 8682, 7164, 2229, 600, 164, 57, 722, 1517, 1828, 1539, 2416, 3148, 3465, 1440)
deaths <- c(0, 0, 130, 552, 738, 414, 198, 90, 56, 50, 71, 137, 178, 194, 290, 310, 149) 
plot(ts(cases), col="red", main="Influenza Epidemic")
lines(ts(10*deaths),col="blue")

Tags

Primary Tags: statistics

Secondary Tags: time series plot

Related Cells

Attribute

Permalink:

Author: T. Judson

Date: 19 Jul 2017 10:49

Submitted by: Tom Judson

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License