|
Project Information |
It uses a Gibbs sampler to estimate parameters, and currently is set up with diffuse priors on all parameters for the model. It is pretty basic at this point, but it works.
Note on the Gamma distribution:
Going back and forth between Matlab/R/WinBUGS can be confusing, because of the different parameterizations of the gamma pdf. Here's the Matlab/BUGS forms and the R equivalents:
Matlab: X ~ g(a,b) E[X] = ab
R equivalent: X ~ g(shape=a,scale=b)
BUGS: X ~ g(a,b) E[X] = a/b
R equivalent: X ~ g(shape=a,rate=b) OR
X ~ g(shape=a,scale=1/b)
| Name | Status | Rev | Size | Updated | Downloads | Brief Description | Actions |
|---|---|---|---|---|---|---|---|
| lwa62to94.txt |
Stable
|
1 | 100.56 KB | 06/23/2008 23:22 PDT | 35 35 | data for this example |
|
| MAR_Bayes.m |
Stable
|
1 | 9.04 KB | 06/23/2008 23:22 PDT | 50 50 | main MAR program |
|
| MLR_Gibbs_func.m |
Stable
|
2 | 649 B | 07/02/2008 16:04 PDT | 45 45 | gibbs routine |
|
| R_BUGS_MAR_code.r |
Stable
|
1 | 1.97 KB | 07/08/2008 08:40 PDT | 46 46 | R/BUGS code to do the MAR(1) Bayesian estimation |
|
| R_BUGS_SSMAR_code.r |
Stable
|
1 | 2.68 KB | 07/08/2008 09:09 PDT | 34 34 | R/BUGS code to do the state space MAR(1) Bayesian estimation (also referred to as dynamic linear models) |
|
| univariate.R |
Stable
|
1 | 30.08 KB | 07/05/2008 17:58 PDT | 38 38 | This is Eric's R code to do Bayesian linear regression with Gibbs sampling. This file must be sourced; for a simpler example see the Gibbs linear regression project... |
|
| univariate_LakeWA_example.r |
Stable
|
2 | 774 B | 07/05/2008 18:04 PDT | 37 37 | This is the R version of Brice's MATLAB code. It includes 2 versions of the algorithm: a pure R algorithm written by Eric, and an implementation of function MCMCregress (> 100X FASTER!). And it does model selection (Bayes factor) |