No articles match
RStan: the R interface to Stan7 months ago
Introduction | Prerequisites | Typical Workflow | Example | Write a Stan Program | Preparing the Data | Sample from the Posterior Distribution | Arguments to the stan Function | Data Preprocessing and Passing | Methods for the "stanfit" Class | Sampling Difficulties | Additional Topics | User-defined Stan Functions | The Log-Posterior (function and gradient) | Optimization in Stan | Model Compilation | Running Multiple Chains in Parallel | See Also
Estimating Survival (Time-to-Event) Models with rstanarm1 years ago
Preamble | Introduction | Modelling framework | Data and notation | Hazard, cumulative hazard, and survival | Delayed entry | Model formulations | Hazard scale models | M-splines model (the default): | Exponential model: | Weibull model: | Gompertz model: | B-splines model (for the log baseline hazard): | Accelerated failure time (AFT) models | Linear predictor | Hazard ratios | Acceleration factors and survival time ratios | Time-fixed vs time-varying effects | Relationship between proportional hazards and AFT models | Multilevel survival models | Estimation framework | Log posterior | Log likelihood | Evaluating integrals in the log likelihood | Prior distributions | Intercept | Estimation | Prediction framework | Survival predictions without clustering | Survival predictions with clustering | Conditional survival probabilities | Standardised survival probabilities | Implementation | Overview | Main modelling function | Default knot locations | Post-estimation functions | Usage examples | Example: A flexible parametric proportional hazards model | Example: Non-proportional hazards modelled using B-splines | Example: Non-proportional hazards modelled using a piecewise constant function | Example: Hierarchical survival models | References | Appendix A: Parameterisations on the hazard scale | Exponential model | Weibull model | Gompertz model | M-spline model | B-spline model | Extension to time-varying coefficients (i.e. non-proportional hazards) | Appendix B: Parameterisations under accelerated failure times | Extension to time-varying coefficients (i.e. time-varying acceleration factors)
Estimating Generalized Linear Models for Continuous Data with rstanarm2 years ago
Introduction | Likelihood | Priors | Posterior | Linear Regression Example | Model comparison | The posterior predictive distribution | Graphical posterior predictive checks | Generating predictions | Gamma Regression Example | References
Estimating Generalized Linear Models for Count Data with rstanarm2 years ago
Introduction | Likelihood | Priors | Posterior | Poisson and Negative Binomial Regression Example | References
How to Use the rstanarm Package2 years ago
Introduction | Step 1: Specify a posterior distribution | Note on "prior beliefs" and default priors | Step 2: Draw from the posterior distribution | Step 3: Criticize the model | Step 4: Analyze manipulations of predictors | Troubleshooting | Markov chains did not converge | Divergent transitions | Maximum treedepth exceeded | Conclusion | References
Hierarchical Partial Pooling for Repeated Binary Trials3 years ago
Introduction | Repeated Binary Trials | Baseball Hits (Efron and Morris 1975) | Pooling | Fitting the Models | Complete Pooling | No Pooling | Partial Pooling | Observed vs. Estimated Chance of Success | Posterior Predictive Distribution | Evaluating Held-Out Data Predictions | Simulating Replicated Data | Prediction for New Trials | Calibration | Sharpness | Why Evaluate with the Predictive Posterior? | $\log E[p(\tilde{y} , | , \theta)]$ vs $E[\log p(\tilde{y} , | , \theta)]$ | Posterior expectation of the log predictive density | Approximating the expected log predictive density | Predicting New Observations | Estimating Event Probabilities | Multiple Comparisons | Ranking | Who has the Highest Chance of Success? | Graphical Posterior Predictive Checks | Test Statistics and Bayesian $p$-Values | Comparing Observed and Replicated Data | Discussion | Exercises | References | Additional Data Sets | Rat tumors (N = 71) | Surgical mortality (N = 12) | Baseball hits 1996 AL (N = 308)
Interfacing with External C++ Code3 years ago
Prior Distributions for rstanarm Models4 years ago
July 2020 Update | Introduction | Default (Weakly Informative) Prior Distributions | Default priors and scale adjustments | Regression coefficients | Intercept | Auxiliary parameters | Note on data-based priors | Disabling prior scale adjustments | How to Specify Flat Priors (and why you typically shouldn't) | Uninformative is usually unwarranted and unrealistic (flat is frequently frivolous and fictional) | Specifying flat priors | Informative Prior Distributions
Probabilistic A/B Testing with rstanarm4 years ago
Abstract | Introduction | Continuous Data | Count Data | Benefits of Bayesian Methods | Conclusion | Acknowlegements | References | Appendix A: Refresher on p-values | Appendix B: Hierarchical Example
Estimating Joint Models for Longitudinal and Time-to-Event Data with rstanarm4 years ago
Preamble | Introduction | Technical details | Model formulation | Longitudinal submodel(s) | Event submodel | Association structures | Assumptions | Log posterior distribution | Model predictions | Individual-specific predictions for in-sample individuals (for $0 \leq t \leq T_i$) | Individual-specific predictions for in-sample individuals (for $t > C_i$) | Individual-specific predictions for out-of-sample individuals (i.e. dynamic predictions) | Population-level (i.e. marginal) predictions | Standardised survival probabilities | Model extensions | Delayed entry (left-truncation) | Multilevel clustering | Model comparison | LOO/WAIC in the context of joint models | Usage examples | Dataset used in the examples | Fitting the models | Univariate joint model (current value association structure) | Univariate joint model (current value and current slope association structure) | Multivariate joint model (current value association structures) | Posterior predictions | Predicted individual-specific longitudinal trajectory for in-sample individuals | Predicted individual-specific survival curves for in-sample individuals | Combined plot of longitudinal trajectories and survival curves | Predicted individual-specific longitudinal trajectory and survival curve for out-of-sample individuals (i.e. dynamic predictions) | Predicted population-level longitudinal trajectory | Standardised survival curves | References
Estimating Generalized (Non-)Linear Models with Group-Specific Terms with rstanarm5 years ago
Introduction | GLMs with group-specific terms | Priors on covariance matrices | Overview | Details | Comparison with lme4 | Advantage: better uncertainty estimates | Advantage: incorporate prior information | Disadvantage: speed | Relationship to glmer | Relationship to gamm4 | Relationship to nlmer | Conclusion
Estimating Generalized Linear Models for Binary and Binomial Data with rstanarm6 years ago
Introduction | Likelihood | Priors | Posterior | Logistic Regression Example | Conditional Logit Models | Binomial Models | Going Further | References
Simulation Based Calibration6 years ago
References
Accessing the contents of a stanfit object6 years ago
Posterior draws | extract() | as.matrix(), as.data.frame(), as.array() | Posterior summary statistics and convergence diagnostics | Sampler diagnostics | Model code | Initial values | (P)RNG seed | Warmup and sampling times
MRP with rstanarm6 years ago
The Data | Exploring Graphically | Comparing sample to population | Effect of the post-stratification variable on preference for cats | Interaction effect | Design effect | Population Estimate | Estimates for states | Other formats | Alternate methods of modelling | Appendix | Examples of other formulas | Code to simulate the data | References
Estimating ANOVA Models with rstanarm6 years ago
Introduction | Likelihood | Priors | Example | Conclusion
Modeling Rates/Proportions using Beta Regression with rstanarm6 years ago
Introduction | Likelihood | Priors | Posterior | An Example Using Simulated Data | An Example Using Gasoline Data | References
Estimating Regularized Linear Models with rstanarm6 years ago
Introduction | Likelihood | QR Decomposition | Priors | Posterior | Example | Alternative Approach | Conclusion | References
Estimating Ordinal Regression Models with rstanarm6 years ago
Introduction | Likelihood | Priors | Example | Conclusion
An Example of mi Usage11 years ago