2327 search results for "regression"

Linear regression in “The Man who counted”

March 25, 2017
By
Linear regression in “The Man who counted”

Recently, I got a book by Brasilian writer  Júlio César de Mello e Souza (published under pen name Malba Tahan), titled The Man who counted. Book is a collection of mathematical stories very similar to Scheherazada’s 1001 Nights, where mathematical story-telling is the center of book.                                                In story 5“In so many words”, Malba describes … Continue...

Read more »

Linear Regression and ANOVA shaken and stirred (Part 2)

March 20, 2017
By

In the first part of this entry I did show some mtcars examples, where am can be useful to explain ANOVA as its observations are defined as: $$ am_i = \begin{cases}1 &\text{ if car } i \text{ is manual} \cr 0 &\text{ if car } i \text{ is automatic}\end{cases} $$ Now I'll show another example to continue the last example from...

Read more »

Linear Regression and ANOVA shaken and stirred (Part 1)

March 19, 2017
By

Linear Regression and ANOVA concepts are understood as separate concepts most of the times. The truth is they are extremely related to each other being ANOVA a particular case of Linear Regression. Even worse, its quite common that students do memorize equations and tests instead of trying to understand Linear Algebra and Statistics concepts that can keep you away...

Read more »

Multiple Regression (Part 3) Diagnostics

March 11, 2017
By
Multiple Regression (Part 3) Diagnostics

In the exercises below we cover some more material on multiple regression diagnostics in R. This includes added variable (partial-regression) plots, component+residual (partial-residual) plots, CERES plots, VIF values, tests for heteroscedasticity (nonconstant variance), tests for Normality, and a test for autocorrelation of residuals. These are perhaps not as common as what we have seen in Related exercise sets:

Read more »

Negative Binomial Regression for Complex Samples (Surveys) #rstats

March 9, 2017
By
Negative Binomial Regression for Complex Samples (Surveys) #rstats

The survey-package from Thomas Lumley is a great toolkit when analyzing complex samples. It provides svyglm(), to fit generalised linear models to data from a complex survey… Read more "Negative Binomial Regression for Complex Samples (Surveys) #rstats"

Read more »

Changing names in the tidyverse: An example for many regressions

March 9, 2017
By
Changing names in the tidyverse: An example for many regressions

A collaborator posed an interesting R question to me today. She wanted to do several regressions using different outcomes, with models being computed on different strata defined by a combination of experimental design variables. She then just wanted to extract the p-values for the slopes for each of the models, and then filter the strata

Read more »

Logistic Regression Regularized with Optimization

February 25, 2017
By
Logistic Regression Regularized with Optimization

Logistic regression predicts the probability of the outcome being true. In this exercise, we will implement a logistic regression and apply it to two different data sets. The file ex2data1.txt contains the dataset for the first part of the exercise and ex2data2.txt is data that we will use in the second part of the exercise. Related Post

Read more »

Linear Regression and ANOVA shaken and stirred

February 21, 2017
By

Linear Regression and ANOVA concepts are understood as separate concepts most of the times. The truth is they are extremely related to each other being ANOVA a particular case of Linear Regression. Even worse, its quite common that students do memorize equations and tests instead of trying to understand Linear Algebra and Statistics concepts that can keep you away...

Read more »

Analytical and Numerical Solutions to Linear Regression Problems

February 18, 2017
By
Analytical and Numerical Solutions to Linear Regression Problems

This exercise focuses on linear regression with both analytical (normal equation) and numerical (gradient descent) methods. We will start with linear regression with one variable. From this part of the exercise, we will create plots that help to visualize how gradient descent gets the coefficient of the predictor and the intercept. In the second part, Related Post

Read more »

How to create a loop to run multiple regression models

February 6, 2017
By
How to create a loop to run multiple regression models

A friend asked me whether I can create a loop which will run multiple regression models. She wanted to evaluate the association between 100 dependent variables (outcome) and 100 independent variable (exposure), which means 10,000 regression models. Regression models with multiple dependent (outcome) and independent (exposure) variables are common in genetics. So models will be Related Post

Read more »

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)