{"id":28067612,"url":"https://github.com/brian-lau/matlabstan","last_synced_at":"2025-05-12T16:58:30.940Z","repository":{"id":12722376,"uuid":"15395111","full_name":"brian-lau/MatlabStan","owner":"brian-lau","description":"Matlab interface to Stan, a package for Bayesian inference","archived":false,"fork":false,"pushed_at":"2023-03-28T22:04:01.000Z","size":945,"stargazers_count":82,"open_issues_count":30,"forks_count":47,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-11T09:52:11.801Z","etag":null,"topics":["bayesian","matlab","matlab-interface","stan","statistics"],"latest_commit_sha":null,"homepage":"","language":"Matlab","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brian-lau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2013-12-23T12:36:24.000Z","updated_at":"2025-03-25T16:53:54.000Z","dependencies_parsed_at":"2023-10-20T18:45:25.214Z","dependency_job_id":null,"html_url":"https://github.com/brian-lau/MatlabStan","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brian-lau%2FMatlabStan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brian-lau%2FMatlabStan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brian-lau%2FMatlabStan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brian-lau%2FMatlabStan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brian-lau","download_url":"https://codeload.github.com/brian-lau/MatlabStan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253784535,"owners_count":21963895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bayesian","matlab","matlab-interface","stan","statistics"],"created_at":"2025-05-12T16:58:30.365Z","updated_at":"2025-05-12T16:58:30.931Z","avatar_url":"https://github.com/brian-lau.png","language":"Matlab","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [MatlabStan](https://github.com/brian-lau/MatlabStan)\n\u003ca href=\"http://mc-stan.org\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/stan-dev/logos/master/logo.png?raw=true\" width=100 alt=\"Stan Logo\"/\u003e\n\u003c/a\u003e\n\nA Matlab interface to [Stan](http://mc-stan.org), a package for Bayesian inference.\n\nFor more information on Stan and its modeling language, see the Stan User's Guide and Reference Manual at [http://mc-stan.org/](http://mc-stan.org/documentation/).\n\n## Installation\nDetails can be found in the [Getting started](https://github.com/brian-lau/MatlabStan/wiki/Getting-Started) page of the wiki.\n\n## Example\nThe following is the classic 'eight schools' example from Section 5.5 of [Gelman et al (2003)](http://stat.columbia.edu/~gelman/book/). The output can be compared to that obtained using the [Rstan](https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started#example-1-eight-schools) and [Pystan](https://github.com/stan-dev/pystan/blob/develop/README.rst#example) interfaces.\n```\nschools_code = {\n   'data {'\n   '    int\u003clower=0\u003e J;         // number of schools '\n   '    real y[J];              // estimated treatment effects'\n   '    real\u003clower=0\u003e sigma[J]; // s.e. of effect estimates '\n   '}'\n   'parameters {'\n   '    real mu; '\n   '    real\u003clower=0\u003e tau;'\n   '    real eta[J];'\n   '}'\n   'transformed parameters {'\n   '    real theta[J];'\n   '    for (j in 1:J)'\n   '    theta[j] = mu + tau * eta[j];'\n   '}'\n   'model {'\n   '    eta ~ normal(0, 1);'\n   '    y ~ normal(theta, sigma);'\n   '}'\n};\n  \nschools_dat = struct('J',8,...\n                     'y',[28 8 -3 7 -1 1 18 12],...\n                     'sigma',[15 10 16 11 9 11 10 18]);\n\nfit = stan('model_code',schools_code,'data',schools_dat);\n\nprint(fit);\n\neta = fit.extract('permuted',true).eta;\nmean(eta)\n\n```\nA collection of Matlab-specific examples is available in the [wiki](https://github.com/brian-lau/MatlabStan/wiki#examples).\n## Need help?\nYou may be able to find a solution in the [wiki](https://github.com/brian-lau/MatlabStan/wiki/). Otherwise, open an [issue](https://github.com/brian-lau/MatlabStan/issues).\n\nContributions\n--------------------------------\nMatlabStan Copyright (c) 2017 Brian Lau [brian.lau@upmc.fr](mailto:brian.lau@upmc.fr), [BSD-3](https://github.com/brian-lau/MatlabStan/blob/master/LICENSE.txt)\n\n[PSIS package](https://github.com/avehtari/MatlabPSIS) Copyright (c) 2015 Aki Vehtari, [GPL-3](http://www.gnu.org/licenses/gpl-3.0.en.html)\n\nPlease feel free to [fork](https://github.com/brian-lau/MatlabStan/fork) and contribute!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrian-lau%2Fmatlabstan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrian-lau%2Fmatlabstan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrian-lau%2Fmatlabstan/lists"}