Reader small image

You're reading from  R Statistics Cookbook

Product typeBook
Published inMar 2019
Reading LevelExpert
PublisherPackt
ISBN-139781789802566
Edition1st Edition
Languages
Tools
Concepts
Right arrow
Author (1)
Francisco Juretig
Francisco Juretig
author image
Francisco Juretig

Francisco Juretig has worked for over a decade in a variety of industries such as retail, gambling and finance deploying data-science solutions. He has written several R packages, and is a frequent contributor to the open source community.
Read more about Francisco Juretig

Right arrow

Assigning the priors

As we know, the priors are ingested by the MCMC algorithm, and are used to calculate the posterior densities. But how should the priors be assigned? Do we actually need a prior for each parameter?

Defining the support

Priors are just statistical distributions that reflect the initial expectation that the modeler has about each parameter. The very first thing we need to decide is, what is the support for the corresponding distributions? For example, for most coefficients in a linear regression model, the modeler very likely knows the correct sign for them. When modeling sales of a product in terms of its price and a promotional effect, the price effect should be negative (a higher price = less sales), and...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
R Statistics Cookbook
Published in: Mar 2019Publisher: PacktISBN-13: 9781789802566

Author (1)

author image
Francisco Juretig

Francisco Juretig has worked for over a decade in a variety of industries such as retail, gambling and finance deploying data-science solutions. He has written several R packages, and is a frequent contributor to the open source community.
Read more about Francisco Juretig