You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On mouseover should display 7-day trend line, this is it in R
# Assume a csv with headers "Cases" and "day", the latter starting at 1
# and read it into data
data <- read.csv(datafile)
# eyeball it on a linear scale to see if it looks right
plot(data$day,data$Cases)
# linear regression on base 2 log of cases vs days, 22-26 observations only
fit <- lm( data[22:26,"day"] ~ log2(data[22:26,"Cases"]) )
# spit out the doubling time in days
fit$coef[2]
The text was updated successfully, but these errors were encountered:
On mouseover should display 7-day trend line, this is it in R
# Assume a csv with headers "Cases" and "day", the latter starting at 1
# and read it into data
data <- read.csv(datafile)
# eyeball it on a linear scale to see if it looks right
plot(data$day,data$Cases)
# linear regression on base 2 log of cases vs days, 22-26 observations only
fit <- lm( data[22:26,"day"] ~ log2(data[22:26,"Cases"]) )
# spit out the doubling time in days
fit$coef[2]
The text was updated successfully, but these errors were encountered: