-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintroduction.qmd
188 lines (142 loc) · 7.96 KB
/
introduction.qmd
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# Introduction {#sec-intro}
```{r}
#| label: load_packages
#| include: false
library(tidyverse)
library(tsibble)
library(feasts)
library(fable)
library(gt)
```
## Structure of a thesis
You start with the frontmatter, usually including abstract acknowledgements and declaration of co-authorship. Then, you have a general Introduction where you introduce the main ideas of your thesis, and an overview of the context and background. In a PhD, typically, Chapters 2--4 would contain your own contributions. Think of each of these as potential papers to be submitted to journals. Finally, Chapter 5 provides some concluding remarks, discussion, ideas for future research, and so on. Appendixes can contain additional material that don't fit into any chapters, but that you want to put on record. For example, additional tables, output, etc.
For a MSc thesis with only 1 manuscript, then the thesis will be composed of the frontmatter followed by the manuscript where each section of the manuscript (*e.g.* introduction, methods, ...) is a chapter, and finished by the bibliography and appendices.
### Front Matter (index.qmd file)
It should include:
* an abstract (in both english and french)
* An author declaration
* Co-authorship statement listing the co-authors and detailling authors contributions for each chapter
* Acknowledgements
* Table of contents (automatically generated with Quarto)
* List of Tables (automatically generated with Quarto)
* List of Figures (automatically generated with Quarto)
### General introduction
This is an overarching, unifying introduction to the dissertation as a whole. It must contain:
a. Introduction
b. Literature review
c. Information enabling a trained researcher reading the chapter to develop sufficient understanding of the field to understand the theme and questions/hypotheses of the dissertation
d. Dissertation theme and objectives or hypotheses to be tested
### Manuscript Chapters
Each subsequent chapter, aside from the General Conclusion, comprises a single manuscript (published, submitted, or nearly submitted).
Importantly, however, a single, consistent format must be used, and chapters must be presented in a logical progression.
* You may include an introductory “Context” section for each chapter, to establish the overall flow within the thesis and to build a tie to previous chapters.
If you have not included a **Declaration of co-authorship** in the frontmatter, this section should include an authorship statement to explain your role in the research, as well as the roles of any co-authors on the corresponding publication.
Normally, it is expected that a PhD student will be the first author on any papers arising from their research.
* Supporting information (SI) also refered to as Electronic Suplementary Material or Appendices, should be provided as Appendices to the thesis.
* If the paper was a Communication or Report, you may have key details in the Supporting Information (SI). Any important elements in the SI, such as experimental details, should be integrated into the main body of the chapter. Less critical elements should be included at the end of the thesis as appendices.
* In some cases, subsequent developments in the field may change the conclusions of one of your published chapters. This may be mentioned in a final
“Subsequent Advances” section following the conclusion of the chapter. This should be discussed with your supervisor.
* Not every paper you’ve published has to be included. If your contribution to a paper was minor (and you are not the first author), omit it.
Talk to your supervisor about what you will include.
### General Conclusion
This is a significant part of a manuscript-based dissertation. It is NOT simply
a summary of the manuscript chapters. It must include:
a. A full analysis of the findings in the various chapters in light of current research in the field
b. Discussion of the overall significance and contribution of the research to the field of study
c. Discussion and conclusions relating the chapters to each other and the overall field
d. Comments on strengths and weaknesses of the dissertation research
e. Evaluation of current knowledge and proposals for new ideas related to the field of study
f. Presentation of the status of relevant working hypotheses
g. Discussion of any potential applications of the research findings
## Quarto
In this template, the rest of the chapter shows how to use quarto. The big advantage of using quarto is that it allows you to include your R or Python code directly into your thesis, to ensure there are no errors in copying and pasting, and that everything is reproducible. It also helps you stay better organized.
For details on using Quarto, see <http://quarto.org>.
## Data
Included in this template is a file called `sales.csv`. This contains quarterly data on Sales and Advertising budget for a small company over the period 1981--2005. It also contains the GDP (gross domestic product) over the same period. All series have been adjusted for inflation. We can load in this data set using the following code:
```{r}
#| label: load_data
#| echo: true
#| message: false
sales <- readr::read_csv("data/sales.csv") |>
rename(Quarter = `...1`) |>
mutate(
Quarter = as.Date(paste0("01-", Quarter), "%d-%b-%y"),
Quarter = yearquarter(Quarter)
) |>
as_tsibble(index = Quarter)
```
Any data you use in your thesis can go into the `data` directory. The data should be in exactly the format you obtained it. Do no editing or manipulation of the data prior to including it in the `data` directory. Any data munging should be scripted and form part of your thesis files (possibly hidden in the output).
## Figures
@fig-deaths shows time plots of the data we just loaded. Notice how figure captions and references work. Chunk names can be used as figure labels with `fig-` prefixed. Never manually type figure numbers, as they can change when you add or delete figures. This way, the figure numbering is always correct.
```{r}
#| label: fig-deaths
#| fig-cap: "Quarterly sales, advertising and GDP data."
sales |>
pivot_longer(Sales:GDP) |>
autoplot(value) +
facet_grid(name ~ ., scales = "free_y") +
theme(legend.position = "none")
```
## Results from analyses
We can fit a regression model to the sales data.
```{r}
#| echo: false
fit <- sales |>
model(arima = TSLM(Sales ~ GDP + AdBudget))
coef <- tidy(fit)
gdp <- coef |>
filter(term == "GDP") |>
pull(estimate)
adbudget <- coef |>
filter(term == "AdBudget") |>
pull(estimate)
```
If $y_t$ denotes the sales in quarter $t$, $x_t$ denotes the corresponding advertising budget and $z_t$ denotes the GDP, then the resulting model is:
$$
y_t = \beta x_t + \gamma z_t + \varepsilon_t
$$ {#eq-drm}
where
$\hat{\beta} = `r sprintf("%.2f", adbudget)`$,
and
$\hat{\gamma} = `r sprintf("%.2f", gdp)`$.
We can reference this equation using @eq-drm.
## Tables
We can also make a nice summary table of the coefficients, as shown in @tbl-coef
Again, when looking at the `.qmd` file notice the use of labels and references to automatically generate table numbers.
```{r}
#| label: tbl-coef
#| tbl-cap: "Coefficients from the fitted model."
tidy(fit) |>
select(term, estimate, p.value) |>
rename(Coefficient = term, Estimate = estimate, `P value` = p.value) |>
knitr::kable(booktabs = TRUE, digits = 3)
```
### Wide table (landscape page)
Her is how you can get a table on page with landscape orientation (@tbl-sideway).
You need to put the table in a pandoc div (delimited by :::) indicating the side way rotation
here is an example for a table but it also works for figures just use `sidewaysfigure`
instead of `sidewaystable`
::: {.sidewaystable data-latex=""}
```{r}
#| label: tbl-sideway
#| echo: false
#| tbl-cap: This is a wide table
exibble |>
gt(
rowname_col = "row",
groupname_col = "group",
locale = "fr"
) |>
fmt_number() |>
fmt_date(
columns = date,
date_style = "yMEd"
) |>
fmt_datetime(
columns = datetime,
format = "EEEE, MMMM d, y",
locale = "en"
) |>
tab_options(table.width = pct(100))
```
:::