Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected pilots.stan and added script to find stan files without R sample #28

Merged
merged 3 commits into from
Aug 12, 2015
Merged

Conversation

dmenne
Copy link
Contributor

@dmenne dmenne commented Aug 4, 2015

Corrected pilot examples to be close to ARM13.5

./Ch.10/sesame_one_pred_2b.stan
./Ch.10/sesame_one_pred_b.stan
./Ch.12/radon_group_chr.stan
./Ch.12/radon_intercept_chr.stan
./Ch.12/radon_no_pool_chr.stan
./Ch.13/13.4_UnderstandingCorrelationsBetweenIntercepts&Slopes.R
./Ch.13/earnings_latin_square_chr.stan
./Ch.13/earnings_vary_si_chr.stan
./Ch.13/pilots_chr.stan
./Ch.13/radon_inter_vary_chr.stan
./Ch.13/radon_vary_si_chr.stan
./Ch.14/pilots_chr.stan
./Ch.16/16.3_FittingAndUnderstangingAVaryingInterceptMultilevelModelUsingRStan.R
./Ch.17/17.2_radon_multi_varying_coef.stan
./Ch.17/17.5_multilevel_poisson.stan
./Ch.17/17.6_multilevel_ordered_categorical.stan
./Ch.17/17.7_latent_glm.stan
./Ch.17/17.7_robit.stan
./Ch.19/item_response.stan
./Ch.19/radon_chr.stan
./Ch.19/radon_redundant_chr.stan
./Ch.20/hiv_chr.stan
./Ch.20/hiv_inter_chr.stan
./Ch.21/finite_populations.stan
./Ch.21/multiple_comparison.stan
./Ch.21/r_sqr.stan
./Ch.21/radon_vary_intercept_floor.stan
./Ch.21/radon_vary_intercept_floor_chr.stan
./Ch.21/radon_vary_intercept_floor2_chr.stan
./Ch.21/radon_vary_intercept_nofloor_chr.stan
./Ch.22/anova_radon_nopred_chr.stan
./Ch.23/educational_subsidy.stan
./Ch.23/electric.stan
./Ch.23/electric_1a_chr.stan
./Ch.23/electric_1b_chr.stan
./Ch.23/electric_1c_chr.stan
./Ch.23/electric_chr.stan
./Ch.24/dogs_check.stan
./Ch.24/dogs_log.stan
./Ch.3/kidscore_momhs.stan
./Ch.4/earn_height.stan
./Ch.8/8.2_FakeDataSimulationToUnderstandResidualPlots.R

As of Aug 4, 2015
./Ch.10/sesame_one_pred_2b.stan
./Ch.10/sesame_one_pred_b.stan
./Ch.12/radon_group_chr.stan
./Ch.12/radon_intercept_chr.stan
./Ch.12/radon_no_pool_chr.stan
./Ch.13/13.4_UnderstandingCorrelationsBetweenIntercepts&Slopes.R
./Ch.13/earnings_latin_square_chr.stan
./Ch.13/earnings_vary_si_chr.stan
./Ch.13/pilots_chr.stan
./Ch.13/radon_inter_vary_chr.stan
./Ch.13/radon_vary_si_chr.stan
./Ch.14/pilots_chr.stan

./Ch.16/16.3_FittingAndUnderstangingAVaryingInterceptMultilevelModelUsingRStan.R
./Ch.17/17.2_radon_multi_varying_coef.stan
./Ch.17/17.5_multilevel_poisson.stan
./Ch.17/17.6_multilevel_ordered_categorical.stan
./Ch.17/17.7_latent_glm.stan
./Ch.17/17.7_robit.stan
./Ch.19/item_response.stan
./Ch.19/radon_chr.stan
./Ch.19/radon_redundant_chr.stan
./Ch.20/hiv_chr.stan
./Ch.20/hiv_inter_chr.stan
./Ch.21/finite_populations.stan
./Ch.21/multiple_comparison.stan
./Ch.21/r_sqr.stan
./Ch.21/radon_vary_intercept_floor.stan
./Ch.21/radon_vary_intercept_floor_chr.stan
./Ch.21/radon_vary_intercept_floor2_chr.stan
./Ch.21/radon_vary_intercept_nofloor_chr.stan
./Ch.22/anova_radon_nopred_chr.stan
./Ch.23/educational_subsidy.stan
./Ch.23/electric.stan
./Ch.23/electric_1a_chr.stan
./Ch.23/electric_1b_chr.stan
./Ch.23/electric_1c_chr.stan
./Ch.23/electric_chr.stan
./Ch.24/dogs_check.stan
./Ch.24/dogs_log.stan
./Ch.3/kidscore_momhs.stan
./Ch.4/earn_height.stan
./Ch.8/8.2_FakeDataSimulationToUnderstandResidualPlots.R
The suggested correction in

http://stats.stackexchange.com/questions/143359/when-is-mu-a-used-in-this-stan-example
is not correct.

Changed variable names to those used in equation 13.9, i.e. gamma and
delta instead of a and b. Removed unused mu_a and mu_b, and added common
mu to really force gamma and delta into approx N(0,).
Add rats_stanified, with flat priors and avoiding sigma-squared detours.
Print mean and stddev for all models, BUGS and Gelfand (original citation).
@bob-carpenter
Copy link
Contributor

Thanks --- we'll review it soon and get it merged. Lots of us
are on the road right now, so it might take a little longer than
usual.

On Aug 4, 2015, at 9:00 AM, Dieter Menne notifications@github.com wrote:

Corrected pilot examples to be close to ARM13.5

• The suggested correction in http://stats.stackexchange.com/questions/143359/when-is-mu-a-used-in-this-stan-example is not correct.
• Changed variable names to those used in equation 13.9, i.e. gamma and delta instead of a and b.
• Removed unused mu_a and mu_b,
• Added common mu to really gamma and delta into approx N(0,).

• Added quick and dirty R script in root to find orphaned stan files. As of today:

./Ch.10/sesame_one_pred_2b.stan
./Ch.10/sesame_one_pred_b.stan
./Ch.12/radon_group_chr.stan
./Ch.12/radon_intercept_chr.stan
./Ch.12/radon_no_pool_chr.stan
./Ch.13/13.4_UnderstandingCorrelationsBetweenIntercepts&Slopes.R
./Ch.13/earnings_latin_square_chr.stan
./Ch.13/earnings_vary_si_chr.stan
./Ch.13/pilots_chr.stan
./Ch.13/radon_inter_vary_chr.stan
./Ch.13/radon_vary_si_chr.stan
./Ch.14/pilots_chr.stan
./Ch.16/16.3_FittingAndUnderstangingAVaryingInterceptMultilevelModelUsingRStan.R
./Ch.17/17.2_radon_multi_varying_coef.stan
./Ch.17/17.5_multilevel_poisson.stan
./Ch.17/17.6_multilevel_ordered_categorical.stan
./Ch.17/17.7_latent_glm.stan
./Ch.17/17.7_robit.stan
./Ch.19/item_response.stan
./Ch.19/radon_chr.stan
./Ch.19/radon_redundant_chr.stan
./Ch.20/hiv_chr.stan
./Ch.20/hiv_inter_chr.stan
./Ch.21/finite_populations.stan
./Ch.21/multiple_comparison.stan
./Ch.21/r_sqr.stan
./Ch.21/radon_vary_intercept_floor.stan
./Ch.21/radon_vary_intercept_floor_chr.stan
./Ch.21/radon_vary_intercept_floor2_chr.stan
./Ch.21/radon_vary_intercept_nofloor_chr.stan
./Ch.22/anova_radon_nopred_chr.stan
./Ch.23/educational_subsidy.stan
./Ch.23/electric.stan
./Ch.23/electric_1a_chr.stan
./Ch.23/electric_1b_chr.stan
./Ch.23/electric_1c_chr.stan
./Ch.23/electric_chr.stan
./Ch.24/dogs_check.stan
./Ch.24/dogs_log.stan
./Ch.3/kidscore_momhs.stan
./Ch.4/earn_height.stan
./Ch.8/8.2_FakeDataSimulationToUnderstandResidualPlots.R

You can view, comment on, or merge this pull request online at:

#28

Commit Summary

• Quick and dirty R script to find the stan files without sample R
• Corrected pilot examples to be close to ARM13.5
File Changes

• M ARM/Ch.13/13.5_Non-NestedModels.R (6)
• M ARM/Ch.13/pilots.stan (32)
• A ARM/UnmatchedStanFiles.R (22)
Patch Links:

https://github.com/stan-dev/example-models/pull/28.patch
https://github.com/stan-dev/example-models/pull/28.diff

Reply to this email directly or view it on GitHub.

@dmenne
Copy link
Contributor Author

dmenne commented Aug 6, 2015

Sorry for leaving the mess by working on the master branch. I had not planned to make a pull request from it, and git is only my third language.

During my vacation, I try to improve my Stan by working on the BUGS examples. I plan to write R test programs, and, if possible, create a "stanified" version of the BUGS program. For example, by removing the inv-gamma priors and the sigma-squared contortions.

https://github.com/dmenne/example-models/blob/master/bugs_examples/vol1/rats/rats.R
https://github.com/dmenne/example-models/blob/master/bugs_examples/vol1/rats/rats_stanified.stan

What is the recommended workflow to make merging easier? Should I put every modified example in a separate branch?

@bob-carpenter
Copy link
Contributor

What we need is a pull request.

I hope we're not duplicating work on the BUGS model
recoding.

You can see the whole development process here:

https://github.com/stan-dev/stan/wiki

The very first "Developer Process" wiki is what you want.
We're not so strict with the example-models repo. As long
as there's a pull request, we'll review and merge into master.

  • Bob

On Aug 6, 2015, at 4:32 AM, Dieter Menne notifications@github.com wrote:

Sorry for leaving the mess by working on the master branch. I had not planned to make a pull request from it, and git is only my third language.

During my vacation, I try to improve my Stan by working on the BUGS examples. I plan to write R test programs, and, if possible, create a "stanified" version of the BUGS program. For example, by removing the inv-gamma priors and the sigma-squared contortions.

https://github.com/dmenne/example-models/blob/master/bugs_examples/vol1/rats/rats.R
https://github.com/dmenne/example-models/blob/master/bugs_examples/vol1/rats/rats_stanified.stan

What is the recommended workflow to make merging easier? Should I put every modified example in a separate branch?


Reply to this email directly or view it on GitHub.

@syclik syclik merged commit fffb2c7 into stan-dev:master Aug 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants