{
  "id": 186884,
  "title": "Hierarchical modelling",
  "url": "/competitions/osic-pulmonary-fibrosis-progression/discussion/186884",
  "author_name": "",
  "post_date": "2020-09-26T12:04:32.034917900Z",
  "votes": 2,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Has anyone experimented with hierarchical modelling? The idea would be to create linear models for each individual patient, then having a higher level model predict these linear model's coefficients for each patient. So something like:</p>\n<p>Patient data (age, sex, smoking status…)        -&gt;      Per-patient model coefficients<br>\nPer patient model coefficients + Weeks -&gt; FVC</p>\n<p>Just wanted to know how this sounds to you.</p>",
  "messages": [
    {
      "id": "1027822",
      "postDate": "09/26/2020 12:04:32",
      "content": "<p>Has anyone experimented with hierarchical modelling? The idea would be to create linear models for each individual patient, then having a higher level model predict these linear model's coefficients for each patient. So something like:</p>\n<p>Patient data (age, sex, smoking status…)        -&gt;      Per-patient model coefficients<br>\nPer patient model coefficients + Weeks -&gt; FVC</p>\n<p>Just wanted to know how this sounds to you.</p>",
      "rawMarkdown": "Has anyone experimented with hierarchical modelling? The idea would be to create linear models for each individual patient, then having a higher level model predict these linear model's coefficients for each patient. So something like:\n\nPatient data (age, sex, smoking status...)        ->      Per-patient model coefficients\nPer patient model coefficients + Weeks -> FVC\n\nJust wanted to know how this sounds to you.",
      "votes": null
    },
    {
      "id": "1027877",
      "postDate": "09/26/2020 12:55:27",
      "content": "<p>This is a totally plausible model - although it's usually done in a single model with random effects on coefficients that may vary between patients (perhaps you already mean that?). A very basic version of this is e.g. <a href=\"https://www.kaggle.com/carlossouza/bayesian-experiments\" target=\"_blank\">this notebook</a> - with the advantage that it's a Bayesian model that produces MCMC samples that directly get to an easy way for a point prediction and the confidence around it (plus you can put in prior knowledge). Of course you can do a frequentist version, too, in python - e.g. using <code>statsmodels.mixedlm</code>- or R - e.g. using <code>lmer</code> from <code>lme4</code>. Of course, you are missing out on any non-linearities.</p>",
      "rawMarkdown": "This is a totally plausible model - although it's usually done in a single model with random effects on coefficients that may vary between patients (perhaps you already mean that?). A very basic version of this is e.g. [this notebook](https://www.kaggle.com/carlossouza/bayesian-experiments) - with the advantage that it's a Bayesian model that produces MCMC samples that directly get to an easy way for a point prediction and the confidence around it (plus you can put in prior knowledge). Of course you can do a frequentist version, too, in python - e.g. using `statsmodels.mixedlm`- or R - e.g. using `lmer` from `lme4`. Of course, you are missing out on any non-linearities.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1027877,
      "author_name": "bjoernholzhauer",
      "author_url": "",
      "post_date": "09/26/2020 12:55:27",
      "content": "<p>This is a totally plausible model - although it's usually done in a single model with random effects on coefficients that may vary between patients (perhaps you already mean that?). A very basic version of this is e.g. <a href=\"https://www.kaggle.com/carlossouza/bayesian-experiments\" target=\"_blank\">this notebook</a> - with the advantage that it's a Bayesian model that produces MCMC samples that directly get to an easy way for a point prediction and the confidence around it (plus you can put in prior knowledge). Of course you can do a frequentist version, too, in python - e.g. using <code>statsmodels.mixedlm</code>- or R - e.g. using <code>lmer</code> from <code>lme4</code>. Of course, you are missing out on any non-linearities.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1027822": "Has anyone experimented with hierarchical modelling? The idea would be to create linear models for each individual patient, then having a higher level model predict these linear model's coefficients for each patient. So something like:\n\nPatient data (age, sex, smoking status...)        ->      Per-patient model coefficients\nPer patient model coefficients + Weeks -> FVC\n\nJust wanted to know how this sounds to you.",
    "1027877": "This is a totally plausible model - although it's usually done in a single model with random effects on coefficients that may vary between patients (perhaps you already mean that?). A very basic version of this is e.g. [this notebook](https://www.kaggle.com/carlossouza/bayesian-experiments) - with the advantage that it's a Bayesian model that produces MCMC samples that directly get to an easy way for a point prediction and the confidence around it (plus you can put in prior knowledge). Of course you can do a frequentist version, too, in python - e.g. using `statsmodels.mixedlm`- or R - e.g. using `lmer` from `lme4`. Of course, you are missing out on any non-linearities."
  },
  "source": "meta"
}