Using RStudio to fit model