4 March 2021 – Advanced Biological Statistics
Assignment: Your task is to use Rmarkdown to write a short report, readable by a technically literate person. The code you used should not be visible in the final report (unless you have a good reason to show it).
Due: Submit your work via Canvas by the end of the day (midnight) on Tuesday, March 16th. Please submit both the Rmd file and the resulting html or pdf file. You can work with other members of class, but I expect each of you to construct and run all of the scripts yourself.
As part of the Mars rover landing effort, you are given elevation data (derived from orbital laser telemetry) at a collection haphazardly located spots on the surface of Mars. Your task is to use these data to produce an estimated map of surface elevation.
The data are available in this file: jezero_elevation.csv. The x
and y
columns give the spatial coordinates of the points (in the centered equidistant cylindrical projection with sphere radius 3396190 meters, but you can ignore this), and the h
column gives the estimated elevation.
As a final product, you should produce:
A map of the predicted elevation, on at least a 51 x 51 regular grid, and
a map showing associated uncertainty in the predictions (e.g., as a image where colors map to posterior standard deviations).
Here are some options for how to do this:
Use brms to fit a surface using bivariate splines, which can be done with this formula:
h ~ t2(x, y)
and use predict( )
to estimate values on the 51x51 grid.
Or, use brms to fit a multivariate Gaussian model (the same model that we fit in class using Stan). This can be done with the formula
h ~ gp(x, y)
But, there are two issues. (1) You should center and scale the data (x
, y
, and h
) before passing it to brms. And, (2) if you try to do this on the full dataset, this will take forever (the computational cost scales with the number of points squared). So, if you go with this method, then you’ll need to fit and predict on smaller chunks of the region separately (e.g, the 9 sub-regions in a 3x3 arrangement with about 30 points in each).
Or, use the Stan code we wrote in class, with the same caveat as above, that you’ll have to fit and predict separately on different subsets of the map (and, it’ll be slower than the brms method).
Note: This is real data, extracted from an elevation map of Jezero crater. You can compare your estimated surfact to the real map available here.