2134 search results for "regression"

Manipulate(d) Regression!

May 5, 2016
By
Manipulate(d) Regression!

The R package ‘manipulate’ can be used to create interactive plots in RStudio. Though not as versatile as the ‘shiny’ package, ‘manipulate’ can be used to quickly add interactive elements to standard R plots. This can prove useful for demonstrating statistical concepts, especially to a non-statistician audience. The R code at the end of this

Read more »

How long could it take to run a regression

April 6, 2016
By
How long could it take to run a regression

This afternoon, while I was discussing with Montserrat (aka @mguillen_estany) we were wondering how long it might take to run a regression model. More specifically, how long it might take if we use a Bayesian approach. My guess was that the time should probably be linear in , the number of observations. But I thought I would be good to check. Let...

Read more »

Assessing significance of slopes in regression models with interaction

March 17, 2016
By
Assessing significance of slopes in regression models with interaction

This is a pretty short post on an issue that popped at some point in the past, at that time I found a way around it but as it arose again recently I decided to go through it. The issue I had was that when modeling an interaction between a continuous (say temperature) and a Related Post

Read more »

How to export Regression results from R to MS Word

March 15, 2016
By
How to export Regression results from R to MS Word

In this post I will present a simple way how to export your regression results (or output) from R into Microsoft Word. Previously, I have written a tutorial how to create Table 1 with study characteristics and to export into Microsoft Word. These posts are especially useful for researchers who prepare their manuscript for publication Related Post

Read more »

First steps with Non-Linear Regression in R

February 25, 2016
By
First steps with Non-Linear Regression in R

Drawing a line through a cloud of point (ie doing a linear regression) is the most basic analysis one may do. It is sometime fitting well to the data, but in some (many) situations, the relationships between variables are not linear. In this case one may follow three different ways: (i) try to linearize the

Read more »

Multiple regression lines in ggpairs

February 16, 2016
By
Multiple regression lines in ggpairs

Abstract Plots including multiple regression lines are added to a matrix of plots generated with the GGally package in R.1 Background Built upon ggplot2, GGally provides templates for combining plots into a matrix through the ggpairs function. Such...

Read more »

Linear regression with random error giving EXACT predefined parameter estimates

January 26, 2016
By
Linear regression with random error giving EXACT predefined parameter estimates

When simulating linear models based on some defined slope/intercept and added gaussian noise, the parameter estimates vary after least-squares fitting. Here is some code I developed that does a double transform of these models as to obtain a fitted model with EXACT defined parameter estimates a (intercept) and b (slope). It does so by: 1)

Read more »

Bayesian regression with STAN Part 2: Beyond normality

January 26, 2016
By
Bayesian regression with STAN Part 2: Beyond normality

In a previous post we saw how to perform bayesian regression in R using STAN for normally distributed data. In this post we will look at how to fit non-normal model in STAN using three example distributions commonly found in empirical data: negative-binomial (overdispersed poisson data), gamma (right-skewed continuous data) and beta-binomial (overdispersed binomial data).

Read more »

How to create confounders with regression: a lesson from causal inference

January 25, 2016
By
How to create confounders with regression: a lesson from causal inference

By Ben Ogorek Introduction Regression is a tool that can be used to address causal questions in an observational study, though no one said it would be easy. While this article won't close the vexing gap between correlation and causation, it will offer specific advice when you're after a causal truth - keep an eye out for...

Read more »

Bayesian regression with STAN: Part 1 normal regression

January 8, 2016
By
Bayesian regression with STAN: Part 1 normal regression

This post will introduce you to bayesian regression in R, see the reference list at the end of the post for further information concerning this very broad topic. Bayesian regression Bayesian statistics turn around the Bayes theorem, which in a regression context is the following: $$ P(theta|Data) propto P(Data|theta) times P(theta) $$ Where (theta) is

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)