# \#matlabstan

**URL:** https://discourse.mc-stan.org/tag/matlabstan/120.md

[Latest](https://discourse.mc-stan.org/latest.md) · [Categories](https://discourse.mc-stan.org/categories.md) · [Tags](https://discourse.mc-stan.org/tags.md)

---

## [Passing Data to Stan with MatlabStan](https://discourse.mc-stan.org/t/passing-data-to-stan-with-matlabstan/32901)

<div class="topic-metadata">

**Author:** [@Corey.Plate](https://discourse.mc-stan.org/u/Corey.Plate)\
**Replies:** 2\
**Last updated:** [September 27, 2023, 6:10pm UTC](https://discourse.mc-stan.org/t/passing-data-to-stan-with-matlabstan/32901 "2023-09-27T18:10:24Z")

</div>

Hey everyone, I have written and compiled my first Stan program and am working through the troubleshooting steps to get it up and running. The problem I’m running into is how to pass the data along from MATLAB. The data…

---

## [Matlabstan Error Getting Stan Version](https://discourse.mc-stan.org/t/matlabstan-error-getting-stan-version/27019)

<div class="topic-metadata">

**Author:** [@X-Yuan](https://discourse.mc-stan.org/u/X-Yuan)\
**Replies:** 8\
**Last updated:** [January 7, 2023, 9:16pm UTC](https://discourse.mc-stan.org/t/matlabstan-error-getting-stan-version/27019 "2023-01-07T21:16:39Z")

</div>

I have installed Matlabstan and I tried to run the ‘‘rats’’ example, and then Matlab returns the error information below: Having a problem getting stan version. This is likely a problem with Java running out of file de…

---

## [3d data in Stan (cmdstan 2.30.1)](https://discourse.mc-stan.org/t/3d-data-in-stan-cmdstan-2-30-1/29574)

<div class="topic-metadata">

**Author:** [@magiceule19](https://discourse.mc-stan.org/u/magiceule19)\
**Replies:** 6\
**Last updated:** [December 20, 2022, 11:58am UTC](https://discourse.mc-stan.org/t/3d-data-in-stan-cmdstan-2-30-1/29574 "2022-12-20T11:58:12Z")

</div>

Hi all, Thanks a lot for the nice tool. I need some feedback in regard to inserting 3d MRI data into Stan. See my model below : The error that I receive is always for all 4 output csv files: output-4.csv: Exception: v…

---

## [Matlabstan - "Having a problem getting stan version."](https://discourse.mc-stan.org/t/matlabstan-having-a-problem-getting-stan-version/12802)

<div class="topic-metadata">

**Author:** [@rainfern](https://discourse.mc-stan.org/u/rainfern)\
**Replies:** 9\
**Last updated:** [May 5, 2021, 8:17am UTC](https://discourse.mc-stan.org/t/matlabstan-having-a-problem-getting-stan-version/12802 "2021-05-05T08:17:09Z")

</div>

Operating System: Windows 10, Matlab 2019b Interface Version: Matlabstan 2.15.10, cmdstan v2.21.0 Compiler/Toolkit: mingw64 Running the 8 schools example gives me the following: Having a problem getting stan version. …

---

## [Matlabstan on windows - cannot open file to write](https://discourse.mc-stan.org/t/matlabstan-on-windows-cannot-open-file-to-write/15441)

<div class="topic-metadata">

**Author:** [@Amber\_Morris](https://discourse.mc-stan.org/u/Amber_Morris)\
**Replies:** 1\
**Last updated:** [June 2, 2020, 1:06pm UTC](https://discourse.mc-stan.org/t/matlabstan-on-windows-cannot-open-file-to-write/15441 "2020-06-02T13:06:50Z")

</div>

I am trying to get matlabstan running on Windows 10. I have cmdstan installed and running as expected. It compiled and I can run the sample code with out any issues. I have tried this with cmdstan 2.23.0 and 2.17.1. I h…

---

## [Matlabstan Problem getting stan version](https://discourse.mc-stan.org/t/matlabstan-problem-getting-stan-version/14146)

<div class="topic-metadata">

**Author:** [@MechB](https://discourse.mc-stan.org/u/MechB)\
**Replies:** 1\
**Last updated:** [April 14, 2020, 3:10pm UTC](https://discourse.mc-stan.org/t/matlabstan-problem-getting-stan-version/14146 "2020-04-14T15:10:54Z")

</div>

Operating System: Windows 10, MATLAB R2017a Interface Version: MatlabStan-2.15.1.0, cmdstan v2.22.1 Compiler/Toolkit:mingw64 Hello, I have the same problem like stated out here: I am also trying to run the 8 school…

---

## [Setting max treedepth in MATLABStan](https://discourse.mc-stan.org/t/setting-max-treedepth-in-matlabstan/13396)

<div class="topic-metadata">

**Author:** [@baribault](https://discourse.mc-stan.org/u/baribault)\
**Replies:** 1\
**Last updated:** [February 29, 2020, 10:34pm UTC](https://discourse.mc-stan.org/t/setting-max-treedepth-in-matlabstan/13396 "2020-02-29T22:34:45Z")

</div>

I’m prototyping a model that’s performing pretty well so far — good mixing (although some autocorrelation), decent Rhat, good parameter recovery. However, it’s often hitting the hitting the maximum treedepth, which is c…

---

## [Hierarchical model for categorical data - sampling takes too long](https://discourse.mc-stan.org/t/hierarchical-model-for-categorical-data-sampling-takes-too-long/9472)

<div class="topic-metadata">

**Author:** [@ofirshan](https://discourse.mc-stan.org/u/ofirshan)\
**Replies:** 0\
**Last updated:** [July 1, 2019, 3:33pm UTC](https://discourse.mc-stan.org/t/hierarchical-model-for-categorical-data-sampling-takes-too-long/9472 "2019-07-01T15:33:13Z")

</div>

Hello STAN experts, I’m running a hierarchical model for predicting categorically distributed data – ratings made at different time points on a 0-10 scale, before and after receiving feedback. Specifically, the data wer…

---

## [How to stop Stan processing in MATLABStan?](https://discourse.mc-stan.org/t/how-to-stop-stan-processing-in-matlabstan/8950)

<div class="topic-metadata">

**Author:** [@ibexw](https://discourse.mc-stan.org/u/ibexw)\
**Replies:** 7\
**Last updated:** [May 24, 2019, 11:32am UTC](https://discourse.mc-stan.org/t/how-to-stop-stan-processing-in-matlabstan/8950 "2019-05-24T11:32:30Z")

</div>

Operating System: Windows Interface Version: MATLABStan Compiler/Toolkit: Hi, is it possible to stop Stan within MATLAB once it has started? I understand there is a kill process in RStan but is there the same thing i…

---

## [Increasing BFGS (optimization) iterations in MATLAB-Stan](https://discourse.mc-stan.org/t/increasing-bfgs-optimization-iterations-in-matlab-stan/8150)

<div class="topic-metadata">

**Author:** [@satyajit001](https://discourse.mc-stan.org/u/satyajit001)\
**Replies:** 8\
**Last updated:** [March 20, 2019, 3:57pm UTC](https://discourse.mc-stan.org/t/increasing-bfgs-optimization-iterations-in-matlab-stan/8150 "2019-03-20T15:57:14Z")

</div>

Dear Authors and Developers, We have been using Stan (MATLAB interface) for training our models. We find it very easy to write and optimize the log posterior. However, We find the ‘iter’ parameter unconfigurable for th…

---

## [How to use the Tests in MatlabStan?](https://discourse.mc-stan.org/t/how-to-use-the-tests-in-matlabstan/7846)

<div class="topic-metadata">

**Author:** [@brainwatcher](https://discourse.mc-stan.org/u/brainwatcher)\
**Replies:** 9\
**Last updated:** [March 5, 2019, 9:12pm UTC](https://discourse.mc-stan.org/t/how-to-use-the-tests-in-matlabstan/7846 "2019-03-05T21:12:42Z")

</div>

I am not familiar in using MatlabStan. I found the “Tests” folder under the MatlabStan directory. I have no idea of their aims. How could I use the scripts in it? Like TestBasicArray.m? Must I run these files before I us…

---

## [Matlabstan running problem,win10, 64bit](https://discourse.mc-stan.org/t/matlabstan-running-problem-win10-64bit/7840)

<div class="topic-metadata">

**Author:** [@brainwatcher](https://discourse.mc-stan.org/u/brainwatcher)\
**Replies:** 3\
**Last updated:** [March 1, 2019, 2:03am UTC](https://discourse.mc-stan.org/t/matlabstan-running-problem-win10-64bit/7840 "2019-03-01T02:03:24Z")

</div>

I installed the MatlabStan2.15.1.0 on my matlab 2018b under windows10 64bits. I had installed the cmdstan under cygwin. MatlabProcessManager was installed and set to path too. I tried to run the example " …\\Examples\\ra…

---

## [Sampling error with hierarchical model](https://discourse.mc-stan.org/t/sampling-error-with-hierarchical-model/7378)

<div class="topic-metadata">

**Author:** [@cianodonnell](https://discourse.mc-stan.org/u/cianodonnell)\
**Replies:** 1\
**Last updated:** [February 4, 2019, 5:34pm UTC](https://discourse.mc-stan.org/t/sampling-error-with-hierarchical-model/7378 "2019-02-04T17:34:57Z")

</div>

I am trying to fit a hierarchical model to (log) count data, modelling the logcounts as gaussians, using MatlabStan. I extended the model from the 8 schools example. For some runs of the model I get the error “- is eith…
