generated from rstudio/bookdown-demo
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path10-classroom.Rmd
144 lines (111 loc) · 5.73 KB
/
10-classroom.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# GitHub Classroom {#classroom}
We use [GitHub Classroom](https://classroom.github.com) to host the
repos of all homework submissions.
Some general guidelines:
+ Make sure the reports or presentations are reproducible on a
different computer of a different person.
- Use relative path.
- Do not `setwd` to a directory which only makes sense on your own
computer.
- Learn from experts (Wenjie Wang's templates and repos).
+ Keep your repo neat and clean.
- No intermediate, generated files.
- Learn to use .gitignore
- No binary files unless necessary (MS files are absolutely not to
be included in this course).
+ Really use Git and practice it in your daily life.
- Do not commit by uploading on GitHub.
## Jump start with Git and GitHub
Work on the exercises of the first two sections of the free online Git
tutorial at [Rithm School](https://www.rithmschool.com/courses/git).
The assignment invitation URL is
[here](https://classroom.github.com/a/viVpP5XY).
## Get familiar with building from source
Use Git to clone the source of Hadley Wickham's
**Advanced R Programming**
from his GitHub repository to a local space on your own
computer. Build the book using RStudio. During the building process,
you may see error messages due to missing tools on your computer. Read
the error messages carefully and fix them. Keep trying until you build
the book. You may need to install some R packages, some fonts, some \LaTeX\
packages, and some building tools for R packages. On Windows, some
codes for parallel computing may not work and need to be swapped
out. Document the problems you encountered and how you solved them in
an R Markdown file named `README.Rmd`. Push it to your homework GitHub
repository so that it can help other students to build the book.
The assignment invitation URL is
[here](https://classroom.github.com/a/04FxCXkp).
## Using RMarkdown
Use **bookdown** or **rmarkdown** to produce a report for the
following task. Consider approximation of the distribution function of
$N(0, 1)$,
\begin{equation}
\Phi(t) = \int_{-\infty}^t \frac{1}{\sqrt{2\pi}} e^{-y^2 / 2} \dd y,
(\#eq:cdf)
\end{equation}
by the Monte Carlo methods:
\begin{equation}
\hat\Phi(t) = \frac{1}{n} \sum_{i=1}^n I(X_i \le t),
\end{equation}
where $X_i$'s are a random sample from $N(0, 1)$, and $I(\cdot)$ is
the indicator function. Experiment with the approximation at
$n \in \{10^2, 10^3, 10^4\}$ at
$t \in \{0.0, 0.67, 0.84, 1.28, 1.65, 2.32, 2.58, 3.09, 3.72\}$ to
form a table.
The table should include the true value for comparison.
Further, repeat the experiment 100 times. Draw box plots of the 100
approximation errors at each $t$ using **ggplot2** [@R-ggplot2] for
each $n$. The report should look like a manuscript, with a title, an
abstract, and multiple sections. It should contain at least one math
equation, one table, one figure, and one chunk of R code. The template
of our Data Science Lab can be helpful:
<https://statds.org/template/>, the source of which is at
<https://github.com/statds/dslab-templates>.
The assignment invitation URL is
[here](https://classroom.github.com/a/4QZ_f0S0).
## Topic Presentation
The invitation link is
[here](https://classroom.github.com/g/csLGwPPe).
+ Presenters get more points in a team
+ A presentation can be given by multiple presenters.
+ Each slot is 30 minutes presentation plus 10 minutes questions and
answers.
+ Each student is required to ask at least one question during the
topic presentation period to earn communication points.
+ Topic could be on tools such as visualization and basic methods.
+ "I don't understand" is not an excuse for skipping any presentation;
Why should you understand? You are here to learn. Try pick up
something each time, and use search to know more.
## Final Project
The invitation link is
[here](https://classroom.github.com/g/xCeLKsNZ).
The project proposal is due in Week 5:
+ 1 page with 12pt font, 2.52cm margins
+ Formulate the research quesiton after reviewing the background
+ Data sources
+ Statistical methods to address the research questions with the data
+ Possible challenges and how to solve them
The final presentation will be in the last few weeks of the semester:
+ The guidelines for topic presentations apply.
+ Attendance during the final presentation period is required for the
attendance points; each absence costs 5 points until 10 points are
exhausted.
+ Each student is required to ask at least one question during the
final presentation period to earn communication points.
The final report will be due by the end of the exam period.
+ Use the template from Wenjie Wang at UConn Data Science Lab.
+ No more than 8 pages including tables/figure and references.
<!-- You can label chapter and section titles using `{#label}` after them, e.g., we can reference Chapter \@ref(intro). If you do not manually label them, there will be automatic labels anyway, e.g., Chapter \@ref(methods). -->
<!-- Figures and tables with captions will be placed in `figure` and `table` environments, respectively. -->
<!-- ```{r nice-fig, fig.cap='Here is a nice figure!', out.width='80%', fig.asp=.75, fig.align='center'} -->
<!-- par(mar = c(4, 4, .1, .1)) -->
<!-- plot(pressure, type = 'b', pch = 19) -->
<!-- ``` -->
<!-- Reference a figure by its code chunk label with the `fig:` prefix, e.g., see Figure \@ref(fig:nice-fig). Similarly, you can reference tables generated from `knitr::kable()`, e.g., see Table \@ref(tab:nice-tab). -->
<!-- ```{r nice-tab, tidy=FALSE} -->
<!-- knitr::kable( -->
<!-- head(iris, 20), caption = 'Here is a nice table!', -->
<!-- booktabs = TRUE -->
<!-- ) -->
<!-- ``` -->
<!-- You can write citations, too. For example, we are using the **bookdown** package [@R-bookdown] in this sample book, which was built on top of R Markdown and **knitr** [@xie2015]. -->