Bayesian regression
Set up, run, and review this analysis in Lifescio.
Supported analysis
Choose Gaussian outcomes or Bernoulli 0/1 outcomes. The app standardizes numeric predictors, applies weakly informative priors and runs PyMC NUTS chains with separate tuning and retained draws. It reports posterior summaries and predictive checks.
Supported scope: Gaussian residuals or Bernoulli outcomes must be appropriate, observations independent, and priors plausible on the standardized scale. Short chains can miss problems. This is a guided regression workflow, not an editor for arbitrary probabilistic programs.
Prepare data and configure the analysis
Enter Outcome followed by one to eight numeric predictors. Choose gaussian for a continuous outcome or bernoulli for an outcome containing both 0 and 1. Predictors must vary; the engine standardizes them. Gaussian outcomes are also centered and scaled.
Coefficient prior SD applies on standardized predictor/model scales and also sets the intercept prior scale. Warm-up draws per chain are tuning draws, separate from retained Posterior draws per chain. Use multiple chains for convergence assessment. The sampler fits this fixed regression structure; it does not select predictors or handle missing values automatically.
Input reference (6 fields)
Enter your data and prespecified choices. Ranges include both limits. For table fields, use cell editing, Paste data, or Import CSV / TSV. Review whether the first imported row contains headings and map the source columns before applying the import. Empty numeric cells are not treated as zero. Open file is for an exported Lifescio analysis JSON file, not a spreadsheet.
| Input | Format | Allowed range | Guidance |
|---|---|---|---|
| Outcome and predictors | Table | — | Use at least 8 observations: outcome first, then 1–8 predictors. Predictors must vary. Gaussian outcomes must vary; Bernoulli outcomes must contain both 0 and 1. Columns in order: Outcome; Predictor. |
| Likelihood | Selection | — | Choices: gaussian, bernoulli. |
| Coefficient prior SD (standardized predictors) | Number | 0.01–100 | — |
| Posterior draws per chain | Whole number | 200–3000 | — |
| Warm-up draws per chain | Whole number | 200–3000 | — |
| Chains | Whole number | 2–4 | — |
Run and review
- Give the analysis a descriptive name and review every example value. Record units, data preparation, and planning assumptions in Reproducibility & notes. For simulations, record the seed and replication or sampling settings.
- Choose Run analysis. Resolve input errors before interpreting output. In the connected app, a run uses a saved input revision; local preview runs need the page to stay open.
- Review Diagnostics for method limitations, warnings, and available numerical checks. A completed run means computation finished; it does not establish that the assumptions fit your study.
- Use the Result table selector to inspect each output. Editing inputs does not recalculate existing results: an earlier-input notice means you need to run again to obtain matching results.
Understand the outputs
Posterior summaries includes means, intervals, effective sizes, Monte Carlo errors, and R-hat. Coefficients remain on standardized scales; use Standardization for the centers and scales. For Gaussian outcomes, a raw-unit slope is standardized coefficient × outcome scale / predictor scale.
Predictive checks returns outcomes on the original outcome scale, with posterior predictive intervals for the supplied observations. Predictive mean comparison includes the prior predictive mean. The trace plot shows only the intercept, so it does not substitute for reviewing diagnostics for every parameter.
Troubleshooting and common mistakes
For invalid Bernoulli input, check that both outcomes are present and coded exactly 0/1. Constant predictors or outcomes are rejected. A workload limit depends on rows, tuning, draws, and chains; reducing the run changes numerical precision and must not hide poor diagnostics.
Divergences, high R-hat, or low effective size require review before reporting. Increasing draws alone may not fix geometry or an unsuitable prior. The application does not provide out-of-sample validation, arbitrary likelihoods, or custom sampling controls.
After correcting inputs, run again and check that the results belong to the new input snapshot. Increasing simulation draws improves numerical precision only; it does not repair invalid data or an unsuitable model.
Save, compare, and export
In the connected app, Save analysis retains the inputs in your account. Run history lets you inspect earlier runs, each with the input revision it used. In local preview, Save analysis downloads an input file instead; download results before leaving the page.
Use Result + inputs for a JSON archive containing the completed result and its inputs, Download CSV for the selected result table, PDF report for a report, and a chart's SVG button for its figure. Table displays round to three decimals; CSV and JSON exports retain calculation precision. Use those values when assessing a result near a decision boundary.
To reopen an archive, select the matching analysis method and choose Open file. Imported inputs start a new draft; a result archive can also display its retained result. It does not attach itself to an existing account analysis or recompute the result. Save or run the imported draft when you want a new account record.