What functions do you use in R to fit a curve to your data and test how well that curve fits? What results are considered good?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just the first part of that question can fill entire books. Just some quick choices:
lm()for standard linear modelsglm()for generalised linear models (eg for logistic regression)rlm()from package MASS for robust linear modelslmrob()from package robustbase for robust linear modelsloess()for non-linear / non-parametric modelsThen there are domain-specific models as e.g. time series, micro-econometrics, mixed-effects and much more. Several of the Task Views as e.g. Econometrics discuss this in more detail. As for goodness of fit, that is also something one can spend easily an entire book discussing.