Tony Tsai

May the force of science be with you

Apr 22, 2017 - 3 minute read - Comments - Influenza

Derivation of Number of Infected Individuals I(a)

(Hens et al. 2012, 63:41) gives the formula for the total number of infective individuals \(I(a)\): \[ \begin{equation} I(a) = \frac{\lambda}{\lambda - \nu}N(0)l(a)\left[e^{-\nu a} - e^{-\lambda a}\right], \tag{1} \end{equation} \] which is obtained by integrating following differential equation with respect to age \(a\): \[ \begin{equation} \frac{dI(a)}{da}=\lambda S(a) - (\nu + \mu)I(a). \tag{2} \end{equation} \] This is also equation (4.11) in (Anderson and May 1992, 67). Here I will present the details of integration.

Jan 5, 2017 - 2 minute read - Comments - MathJax

Display Multi-line Equations and Matrix Correctly in Hugo

The first test case is to create a matrix consisting of following elements $$ \begin{matrix} 1 & x & x^2 1 & y & y^2 1 & z & z^2 \end{matrix} $$ but all elemments of the matrix are displayed in one line. Fortunately, this can be solved by wraping the math expression inside a <div> </div> block, which is hinted by the hugo documents of MathJax Support. besides, the blank line before <div> </div> block is necessary, otherwise the matrix would not be displayed correctly.

Aug 9, 2015 - 8 minute read - Comments - R

Optimization of Disk Usage for animint

Problem The easy test for becoming a potential student of animint project for GSoC 2015 is to use animint to visualize some data from your domain of expertise, and upload your visualization to the web using animint2gist. I used animint to visualize the data from the CDC’s State-level FluView, which is a main data source of my Ph.D. influenza research. The script for generating the FluView viz can be found in AnimintTest repository.

May 21, 2015 - 5 minute read - Comments - R

Operator for Extracting Named List Elements to Variables

In routine data analysis, I often need to convert list elements into variables. For exampple, when I create a function returning multiple values and I would like to use those values as variables separately, as only one object can be returned by the function, the common way to accomplish this task is that multiple values are combined as a list returned by the function, elements of interest are then extracted and assigned to variables.

May 10, 2015 - 5 minute read - Comments - Influenza

Resources for Influenza Research

Today I made a list of resources for influenza research. I will keep updating this list as my influenza research goes further. The up-to-date version can be found on my github. Contents Infectious Diseases Epidemiology Modeling Infectious Diseases Topics and Keywords Ecology and Evolution of Influenza Seasonality of Influenza Dynamics of Influenza Influenza Transmission Influenza Forecasting Digital Detection of Influenza Databases for Influenza Research Workshops and Conferences MOOCs Contributing Topics and Keywords Influenza | Flu Pandemic (Antigenic Shift) vs.

Apr 23, 2015 - 2 minute read - Comments - Statistical Computing

Why Does the Jackknife Estimate of Standard Error Have the Factor (n-1)/n?

Today I read 7.2 The Jackknife in Stastical Computing with R and found the explanation for why the jackknife estimate of standard error have the factor $(n-1)/n$ is unclear. I refered to An Introduction to the Bootstrap by Bradley Efron and R. J. Tibshirani, and the slides of jackknife by Rozenn Dahyot to figure out the reason. Here is my understanding for the existence of factor $(n-1)/n$. The jackknife samples are computed by leaving out one observation $x_i$ from a sample $\mathbf{x} = (x_1, x_2, \cdots, x_n)$ at a time: $$ \mathbf{x}_{(i)} = (x_1, x_2, \cdots, x_{i-1}, x_{i+1}, \cdots, x_n) $$ for $i = 1, 2, \cdots, n$.