R Fit Smooth Curve to Plot of Data (Example) | Add Fitted Line to Graph | loess & predict Functions

preview_player
Показать описание
R code of this video:

x <- 1:100
y <- sort(rnorm(100))

plot(x, y) # Plot without line

curve_values <- loess(y ~ x) # Apply loess function

plot(x, y) # Plot with line
lines(predict(curve_values),
col = "red",
lwd = 3)

Follow me on Social Media:

Рекомендации по теме
Комментарии
Автор

I would like to appreciate your commitment, and precise explanation, Thank you!

wendesenmelak
Автор

Very good video, Joachim.🤩💪👌
Thank you very much.

agsoutas
Автор

Thank you so much..pls can you make a video, showing how to plot the power of a test against sample size or any other statistical variable like delta, to show there relationship, maybe using t test or TOST test.

ekenechikwelu
Автор

Is there any different between LOWESS and LOESS sir?

ammarulwan
Автор

heey, can you make a video about curve command ? like "curve(dnorm(...))"

MustafaErkaya