Here are 3 questions about the LOESS smoothing fit.
# Loess model
plot(Y ~ X)
loess.model <- loess(Dataset$Y ~ Dataset$X)
loess.model
hat <- predict(loess.model)
lines(Dataset$X[order(Dataset$X)], hat[order(Dataset$X)], col="red")
Number of Observations: 52
Equivalent Number of Parameters: 4.62
Residual Standard Error: 0.9877
- Is it possible to get the R-square of the loess fit (red curve)? If yes, how can I get the R-square? Could you give me the R code?
- It is impossible to get the equation of the smoothing fit (red curve). Therefore we can not do any prediction with a smoothing fit LOESS? On the contrary we can easily do/make prediction with the linear line.
- What is the main purpose to use a smoothing fit instead of a linear line? Is the smoothing fit more accurate, although we can not do any prediction?