Code Monkey home page Code Monkey logo

applied-longitudinal-data-analysis-with-brms-and-the-tidyverse's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

applied-longitudinal-data-analysis-with-brms-and-the-tidyverse's Issues

variance priors

Consider referencing Popoviciu's inequality on variances to define the upper limit of the variance for bounded continuous variables. https://en.wikipedia.org/wiki/Popoviciu%27s_inequality_on_variances. Consider the CES-D scale in Chapter 5. The lowest score is 0 and the highest score is 80. Using the formula, we can compute the maximum variance and standard deviation like so.

highest <- 80
lowest <- 0

# max variance
(highest - lowest)^2 / 4

# max sd
sqrt((highest - lowest)^2 / 4)

In this case, the maximum values are 1600 and 40, respectively.

You can confirm the inequality with sample statistics like so.

var(rep(c(0, 80), each = 1e5))
sd(rep(c(0, 80), each = 1e5))

A nice thing about the sample statistic version is it gives an intuition about what the expected standard deviation would be if, say, you expected a flat distribution for the CES-D.

sd(rep(0:80, each = 1e5))

In this case, the standard deviation is about 23.4.

Ch 7

  • Add a basic line plot of the opposites_pp data at the top of the chapter, something like
opposites_pp %>% 
  ggplot(aes(x = time, y = opp, group = id)) +
  geom_line(size = 1/4, alpha = 1/4)
  • Somewhere toward the end of the chapter, explicitly mention how the alternatives to the standard multilevel model of change do not have id-specific equations (what frequentists would call empirical Bayes).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.