Reproducible Research All Weeks Quiz Answer

Practice Exercise Quiz 1


Question 1)
Suppose I conduct a study and publish my findings. Which of the following is an example of a replication of my study?

  • I take my own data, analyze it again, and publish new findings.
  • An investigator at another institution conducts a study addressing a
    different scientific question and publishes her findings.
  • I give my data to an independent investigator at another institution,
    she analyzes the data and gets the same results as I originally
    obtained.
  • An investigator at another institution conducts a study addressing the
    same question, collects her own data, analyzes it separately from me,
    and publishes her own findings.

Question 2)
Which of the following is a requirement for a published data analysis to be reproducible?

  • The investigator’s final publication is made available free of
    charge.
  • The analysis is conducted on a variant of the Unix operating
    system.
  • The full computer code for doing the data analysis is made publicly
    available.
  • The investigator makes available his computer, on which the analysis
    was originally conducted.

Question 3)
Which of the following is an example of a reproducible study?

  • The study’s analytic data are publicly available, but the computer code
    is not.
  • The study’s analytic data and computer code are not publicly available,
    but the study was simple enough to be repeated by an independent
    investigator.
  • The study’s original authors re-run their computer code on their
    analytic data and confirm publicly that the findings match those of the
    published results.
  • The study’s analytic data and computer code for the data analysis are
    publicly available. When the code is run on the analytic data, the
    findings are identical to the published results.

Question 4)
Which of the following is a reason that a study might NOT be fully replicated?

  • The original study had null findings.
  • The original investigator does not want to make the analytic data
    available.
  • The original study was published in a high impact journal and is
    considered authoritative.
  • The original study was very expensive and there is no money to repeat
    it in a different setting.

Question 5)
Which of the following is a reason why publishing reproducible research is increasingly important?

  • Most studies today are small-scale and easily replicated.
  • The statistical methods for most studies can be accurately described
    using plain language.
  • Computing power is limited today, making it difficult to apply
    sophisticated statistical methods.
  • New technologies are increasing the rate of data collection, creating
    datasets that are more complex and extremely high dimensional.

Question 6)
What is the role of processing code in the research pipeline?

  • It transforms the measured data into analytic data.
  • It conducts the statistical analysis of the primary outcome.
  • It transforms the analytic data into computational results.
  • It transforms the computational results into figures and tables.

 

Question 7)
Which is a goal of literate statistical programming?

  • Separate figures and tables from other data analytic summaries.
  • Ensure that data analysis documents are always exported in PDF
    format.
  • Require that data analysis summaries are always written in LaTeX.
  • Combine explanatory text and data analysis code in a single
    document.

Question 8)
What does it mean to weave a literate statistical program?

  • Transform a literate program from R to python.
  • Transform the literate program into a machine readable code file.
  • Compress the literate program so that it takes up less space.
  • Transform the literate program into a human readable document.

Question 9)
Which of the following is required to implement a literate programming system?

  • A Unix-based computer system.
  • A program that views PDF files.
  • A documentation language like LaTeX.
  • A web server for publishing documents.

Question 10)
What is one way in which the knitr system differs from Sweave?

  • knitr is written in python instead of R.
  • knitr was developed by Friedrich Leisch.
  • knitr lacks features like caching of code chunks.
  • knitr allows for the use of markdown instead of LaTeX.

Week 2 Quiz Answer

 

 

 Practice Exercise Quiz 2

 

Question 1)

Who created Markdown?

  • John Gruber
  • Yihui Xie
  • Hadley Wickham
  • Robert Gentleman

 

 

Question 2)

When writing a document in R Markdown, how do you denote the beginning of an R code chunk?

  • <rcode>
  • <code>        
  • “`{r}
  • “`

 

 

 

Question 3)

When using knitr, how do you indicate the height and width of a plot created in a code chunk?

  • Set the ‘dpi’ option for the code chunk
  • Set the ‘height’ and ‘width’ options for the code chunk
  • Set the ‘size’ and ‘scale’ options for the code chunk
  • Set the ‘fig.height’ and ‘fig.width’ options for the code chunk

 

 

Question 4)

With some code chunks, we may not want the output generated by the chunk to be rendered into HTML but would prefer to print the output verbatim. 

How can we specify this preference for a given code chunk?

  • Set the option tidy = FALSE
  • Set the option highlight = TRUE
  • Set the option message = FALSE
  • Set the option results = “asis”

 

 

Question 5)

When using knitr and R Markdown and producing output in HTML, why should you never edit the resulting HTML file?

  • The HTML file is not a text file.
  • The Markdown file generated by knitr is the appropriate file to
    edit.
  • Every time you knit() the R Markdown file, the HTML file will be
    overwritten
  • Editing the HTML file requires knowledge of a separate markup
    language.

Leave a Comment