Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no output #20

Open
under-score opened this issue Apr 18, 2020 · 3 comments
Open

no output #20

under-score opened this issue Apr 18, 2020 · 3 comments

Comments

@under-score
Copy link

using the most recent github version with

<incidence object>
[137439 cases from days 2020-01-28 to 2020-04-18]

$counts: matrix with 82 rows and 1 columns
$n: 137439 cases in total
$dates: 82 dates marking the left-side of bins
$interval: 1 day
$timespan: 82 days
$cumulative: FALSE

mu=3.96 and sigma=4.7, I get

> /// Early estimate of reproduction number (R) //
>  // class: earlyR, list
> 
>  // Maximum-Likelihood estimate of R ($R_ml):
> numeric(0)
> 
> 
>  // $lambda:
>   NA 0.4175997 0.7332225 0.560698 1.273605 0.9786846...
> 
>  // $dates:
> [1] "2020-01-28" "2020-01-29" "2020-01-30" "2020-01-31" "2020-02-01" "2020-02-02"
> ...
> 
>  // $si (serial interval):
> A discrete distribution
>   name: gamma
>   parameters:
>     shape: 0.695029362880886
>     scale: 5.69760101010101
@thibautjombart
Copy link
Contributor

Hi there,
The example of get_R seems to work fine. Could you provide a reproducible example?

@under-score
Copy link
Author

thank you, here is a last minute dataset

x <- read.csv("https://www.wjst.de/corona/onset.csv", stringsAsFactors = FALSE)
i <- incidence(x$x, last_date=as.Date("2020-04-20") )
get_R(i, si_mean =3.96, si_sd=4.75)

@billlyzhaoyh
Copy link

I think I encountered the same issue as well. When I tried to simulate with 10,000 cases, the output is 0 but when I scale back to 1,000 cases, it works just fine.

@under-score did you manage to find a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants