2292 search results for "regression"

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 »

Multiple Regression (Part 2) – Diagnostics

January 26, 2017
By
Multiple Regression (Part 2) – Diagnostics

Multiple Regression is one of the most widely used methods in statistical modelling. However, despite its many benefits, it is oftentimes used without checking the underlying assumptions. This can lead to results which can be misleading or even completely wrong. Therefore, applying diagnostics to detect any strong violations of the assumptions is important. In the

Read more »

Mean and Quantile Regression using Mosek

January 19, 2017
By
Mean and Quantile Regression using Mosek

Many of the problems we encounter in Econometrics can be formulated as a linear or a quadratic problem. In this post, I want to approach two traditional problems: Quantile Regression and Ordinary Least Squares as convex problems and how to implement them in R using the package RMosek.

Read more »

Regression model with auto correlated errors – Part 3, some astrology

January 17, 2017
By
Regression model with auto correlated errors – Part 3, some astrology

The results of the study are interesting from an astrological point of view. Astrological signs are divided into groups by order. The first grouping is by alternating order, with the first sign (Aries) positive and the next sign negative, the third positive, and so on through the circle. The second grouping is in groups of Related Post

Read more »

Multiple Regression (Part 1)

January 15, 2017
By
Multiple Regression (Part 1)

In the exercises below we cover some material on multiple regression in R. Answers to the exercises are available here. If you obtained a different (correct) answer than those listed on the solutions page, please feel free to post your answer as a comment on that page. We will be using the dataset state.x77, which

Read more »

Regression model with auto correlated errors – Part 2, the models

January 14, 2017
By
Regression model with auto correlated errors – Part 2, the models

In the first part I created the data for testing the Astronomical/Astrological Hypotheses. In this part, I started by fitting a simple linear regression model. mod.lm = lm(div.a.ts~vulcan.ts) summary(mod.lm) Call: lm(formula = div.a.ts ~ vulcan.ts) Residuals: Min 1Q Median 3Q Max -159.30 -53.88 -10.37 53.48 194.05 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 621.23955 Related Post

Read more »

Regression model with auto correlated errors – Part 1, the data

January 12, 2017
By
Regression model with auto correlated errors – Part 1, the data

The assumptions of simple linear regression include the assumption that the errors are independent with constant variance. Fitting a simple regression when the errors are auto-correlated requires techniques from the field of time series. If you are interested in fitting a model to an evenly spaced series where the terms are auto-correlated, I have given 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)