Name:
Andrew ID:
Collaborated with:

This lab is to be completed in class. You can collaborate with your classmates, but you must identify their names above, and you must submit your own lab as an Rmd file on Blackboard, by 11:59pm on the day of the lab.

There are Homework 9 questions dispersed throughout. These must be written up in a separate Rmd document, together with all Homework 9 questions from other labs. Your homework writeup must start as this one: by listing your name, Andrew ID, and who you collaborated with. You must submit your own homework as a knit HTML file on Blackboard, by 11:59pm on Tuesday November 8. This document contains 15 of the 45 total points for Homework 9.

Reading in, exploring exoplanets

Linear regression modeling

Hw9 Bonus. What value do you get for the intercept, and does this match what you would expect, given Kepler’s third law (displayed above)?

Hw9 Q1 (5 points). Write a function called exo.reg(), that has just one input exo.reg.data.cur, performs a regression of the of the log orbital period, \(\log(T)\), onto the log host star mass and log semi-major axis, \(\log(M)\) and \(\log(a)\), using the data in exo.reg.data.cur, and returns a vector of the 3 regression coefficients (intercept, coefficient for \(\log(M)\), and coefficient for \(\log(a)\)). Verify, that when run with exo.reg.data.cur=exo.reg.data, which should be the default, it gives the same coefficients that you computed previously.

Hw9 Q2 (10 points). Compute jackknife estimates of the standard errors of the estimated regression coefficients of \(\log(M)\) and \(\log(a)\), from the exo.reg.data data set. Your code here should use either a for() loop, or one of the apply() functions, and should involve repeatedly calling the function exo.reg() defined in the last question. (Hint: you may wish to revisit Lab 7w as a refresh on jackknife estimates of standard errors.) How do your estimates here compare to this read off of the summary of the linear model object, reported in the lab above?