March 2019
Beginner to intermediate
448 pages
13h 14m
English
In the following example, we will fit a linear regression model to our house price dataset. The objective is to model the house prices in terms of several variables, such as the size of the property, the number of bathrooms, the number of bedrooms, the number of entrances, the size of the balcony, and the size of the house entrance. In this example, we won't be very specific about the priors, but we do know that all these variables should have a positive impact. One natural possibility is to use a gamma() distribution, which is naturally bounded by zero:
library(rstan)data = read.csv("./house_prices.csv")
Read now
Unlock full access