\[%% % Add your macros here; they'll be included in pdf and html output. %% \newcommand{\R}{\mathbb{R}} % reals \newcommand{\E}{\mathbb{E}} % expectation \renewcommand{\P}{\mathbb{P}} % probability \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\logistic}{logistic} \DeclareMathOperator{\sd}{sd} \DeclareMathOperator{\var}{var} \DeclareMathOperator{\cov}{cov} \DeclareMathOperator{\cor}{cor} \DeclareMathOperator{\Normal}{Normal} \DeclareMathOperator{\LogNormal}{logNormal} \DeclareMathOperator{\Poisson}{Poisson} \DeclareMathOperator{\Beta}{Beta} \DeclareMathOperator{\Binom}{Binomial} \DeclareMathOperator{\Gam}{Gamma} \DeclareMathOperator{\Exp}{Exponential} \DeclareMathOperator{\Cauchy}{Cauchy} \DeclareMathOperator{\Unif}{Unif} \DeclareMathOperator{\Dirichlet}{Dirichlet} \DeclareMathOperator{\Wishart}{Wishart} \DeclareMathOperator{\StudentsT}{StudentsT} \DeclareMathOperator{\Weibull}{Weibull} \newcommand{\given}{\;\vert\;} \]
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 15th. 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.
Note: Next time figure out how to make the smooth less smooth. Also, maybe add noise to the measurements? (or not)
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).
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.