The question: Generate a response vector Y of length n = 100 according to the cubic model: =0+1+2^2+3^3+ where β0, β1, β2, and β3 are constants of your own choice.
I am trying to assign random integers to the 4 beta's. I wonder if I can assign them with different values in one line in R?
My approach is as follows:
beta_0, beta_1, beta_2, beta_3 = c(1, 2, 3, 4)
Thank you!