Learn how to fit a model in R, plot the smooth curve over the data, using lm() and predict() functions.
Пікірлер: 8
@loki92loki2 жыл бұрын
Thanks, Help me a lot
@g.greyzone73002 жыл бұрын
This is so good and exactly what I was looking for. Thank you so much. Why, oh why, does the person who does something so good, stop here. Seriously sad :(
@darthszarych55882 жыл бұрын
This was helpful thank you!
@waleros6 жыл бұрын
Nice! Thanks! Although, do you know any methods on how to determine the proper equation based on the shape of the plotted data?
@manyminimoose11186 жыл бұрын
My pleasure! The proper equation can be difficult to determine, and in general it comes down to guesswork and experience. If you know more about the process that generates your data, then you can use that to get a closer approximation. Something you can play around with are more complicated formulas, such as y~log(x), and composite formulas such as y~exp(x)+x^2+x.
@manyminimoose11186 жыл бұрын
If you want a method that doesn't require you to guess the proper equation, you might try something like "loess" (stat.ethz.ch/R-manual/R-devel/library/stats/html/loess.html), you can use it in a similar way to "lm", and it will work with "predict". Try running the example code at the bottom of the link.
@waleros6 жыл бұрын
Awesome! Thanks a lot!!! Keep it going!!!
@manyminimoose11186 жыл бұрын
Any time! I'm moving my educational content to a new channel (ManyMiniMaths, goo.gl/4UMWZt) so if you want more similar content you should check it out! I'm also taking suggestions for topics you'd like covered (comment on a video or tweet me @mrparker9090).