Skip to main content

Birthday data!

Someone asked us for the birthday data, and Aki replied:

We used 1969-1989 also in BDA3 https://ift.tt/2w8eCYl
And there we mention that the birthday data come from the National Vital Statistics System natality data and are at https://ift.tt/2jsRz1R, provided by Robert Kern using Google BigQuery.

The code for the BDA3 example is at https://ift.tt/2ToWXDF (with link to data, too)

We have also a more recent paper using the data https://ift.tt/3ktWUT9 with R and Stan code available at https://ift.tt/3kpl4ho and the copy of the data is in the same repo at
https://ift.tt/34vkbhX



from Statistical Modeling, Causal Inference, and Social Science https://ift.tt/3ouG5dc
via IFTTT

Comments

Popular posts from this blog

Zooming in on maps with sf and ggplot2

(This article was first published on r-bloggers – WZB Data Science Blog , and kindly contributed to R-bloggers) When working with geo-spatial data in R, I usually use the sf package for manipulating spatial data as Simple Features objects and ggplot2 with geom_sf for visualizing these data. One thing that comes up regularly is “zooming in” on a certain region of interest, i.e. displaying a certain map detail. There are several ways to do so. Three common options are: selecting only certain areas of interest from the spatial dataset (e.g. only certain countries / continent(s) / etc.) cropping the geometries in the spatial dataset using sf_crop() restricting the display window via coord_sf() I will show the advantages and disadvantages of these options and especially focus on how to zoom in on a certain point of interest at a specific “zoom level”. We will see how to calculate the coordinates of the display window or “bounding box” around this zoom point. Loading t...

Controlling legend appearance in ggplot2 with override.aes

[This article was first published on Very statisticious on Very statisticious , and kindly contributed to R-bloggers ]. (You can report issue about the content on this page here ) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. In ggplot2 , aesthetics and their scale_*() functions change both the plot appearance and the plot legend appearance simultaneously. The override.aes argument in guide_legend() allows the user to change only the legend appearance without affecting the rest of the plot. This is useful for making the legend more readable or for creating certain types of combined legends. In this post I’ll first introduce override.aes with a basic example and then go through three additional plotting scenarios to how other instances where override.aes comes in handy. Table of Contents R packages Introducing override.aes Adding a guides() layer Using the guide argument in scale_*() Changing multiple aesthetic par...