<commit_before>---  
layout: post  
title: Smoking Cohort Explorations - BRFSS data  
author: Greg  
tags: smoking  
---

I'm trying to build a age-period-cohort model of smoking using the
various MPC cleaned datasets. Since I have the most experience with
BRFSS, I started with just some simple visualizations looking at the
data through a cohort lense. Things run a bit slow to use srvyr or
survey functions to get estimates of variance, so I'll just use weighted
means and rely on inter-year variability to show the variation (at least
for now, for this exploratory work).

I think the best graphs come from the most simple variable whether the
respondent has smoked 100 cigarettes total in their lifetime. Here they
are in gif form:

![](/images/blog/2017-04-02/unnamed-chunk-2-1.gif)

If that gif makes your head swim, here's a faceted graph showing every
5th cohort's trends.

![](/images/blog/2017-04-02/unnamed-chunk-3-1.png)

I see 4 phases of broad trends:

1.  **Not enough data (Roughly 1890-1905)**  
    At first there's just not enough data and so there's too much<commit_msg>see if gif is hte problem<commit_after>---  
layout: post  
title: Smoking Cohort Explorations - BRFSS data  
author: Greg  
tags: smoking  
---

I'm trying to build a age-period-cohort model of smoking using the
various MPC cleaned datasets. Since I have the most experience with
BRFSS, I started with just some simple visualizations looking at the
data through a cohort lense. Things run a bit slow to use srvyr or
survey functions to get estimates of variance, so I'll just use weighted
means and rely on inter-year variability to show the variation (at least
for now, for this exploratory work).

I think the best graphs come from the most simple variable whether the
respondent has smoked 100 cigarettes total in their lifetime. Here they
are in gif form:


If that gif makes your head swim, here's a faceted graph showing every
5th cohort's trends.

![](/images/blog/2017-04-02/unnamed-chunk-3-1.png)

I see 4 phases of broad trends:

1.  **Not enough data (Roughly 1890-1905)**  
    At first there's just not enough data and so there's too much
{'fraction_non_alphanumeric': 0.06206252916472235, 'fraction_numerical': 0.027064862342510498, 'mean_word_length': 3.8616780045351473, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1350268', 'n_tokens_mistral': 680, 'n_tokens_neox': 602, 'n_words': 325}