异方差:诊断与处理

对于模型,如果出现Var(Ui) = σi^2,即对于不同的样本点,随机误差项的方差不再是常数,而互不相同,则认为出现了异方差性(Heteros

用R制作中国人口分布图

一图胜千言,一点不假。能用图不用表,能用表不用文字,这是我写文档的原则。图表传导信息更直接,也更具冲击力。本文试图尝试利用ggplot2包制

Creating a New Theme

Introduction This tutorial will show you how to create a simple theme in Hugo. I assume that you are familiar with HTML, the bash command line, and that you are comfortable using Markdown to format content. I’ll explain how Hugo uses templates and how you can organize your templates to create a theme. I won’t cover using CSS to style your theme. We’ll start with creating a new site with a very basic template.

Animated plots in R and LaTeX

I like to use animated plots in my talks on functional time series, partly because it is the only way to really see what is going on with changes in the shapes of curves over time, and also because audiences love them! Here is how it is done. For LaTeX, you need to create every frame as a separate graphics file. Here is an example. First the R code: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 library(demography) nyears <- length(fr.