user.name = 'ENTER A USER NAME HERE'

Exercise 1

This problem set is designed to be solved in RStudio's new Visual Mode. The solution file should be kept in the default source mode, since some RTutor syntax, like the start of a block with #< will be rewritten in visual mode. In the visual mode, HTML links, images and Latex fomulas will be nicely displayed. Let us look at an example...

Consider the following simulated code:

n = 1000
eps = rnorm(n,0,1)
x2 = rnorm(n,0,1)
x1 = rnorm(n,0,1) +x2
beta0 = 100; beta1 = 0; beta2 = 1;
y = beta0+beta1*x1+beta2*x2+eps

Estimate the following short regression:

$$y = \beta_0 + \beta_1 x_1 + u$$

# Complete the code
lm(___)

What do we learn?

(Source: xkcd)



skranz/RTutor documentation built on Feb. 7, 2024, 12:53 a.m.