So I have been trying to decipher some code but have hit a roadblock.
can someone please explain to me the what is being done to P$L
to get P$HY
to get column Y.
I need to understand Functionally (visually how the data frame changes) and from a Mathematical point of view.
Thanks in advance
# create sample data frame
L <- c(15,12,9,6,3,0)
HY <- c(0,0.106,0.277,0.641,0.907,1)
P <- data.frame(L,Y)
# constants
d <- 5
# THIS IS THE PART THAT I DO NOT UNDERSTAND!!
Y <- lm(P$HY ~ poly(P$L, d))
So it re-iterate the question I´m trying to figure out, mathematically and functionally, what Y <- lm(HY ~ poly(L, d))
is doing.