Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into dev

# Conflicts:
#	README.md
#	inst/stan/hamstr.stan
#	man/figures/README-unnamed-chunk-14-1.svg
#	man/figures/README-unnamed-chunk-16-1.svg
#	man/figures/README-unnamed-chunk-17-1.svg
#	man/figures/README-unnamed-chunk-18-1.svg
#	man/figures/README-unnamed-chunk-19-1.svg
#	man/figures/README-unnamed-chunk-4-1.svg
#	man/figures/README-unnamed-chunk-5-1.svg
#	man/figures/README-unnamed-chunk-7-1.svg
#	man/figures/README-unnamed-chunk-8-1.png
#	man/figures/README-unnamed-chunk-9-1.svg
  • Loading branch information
andrewdolman committed Mar 6, 2024
2 parents 132c915 + 6c965a7 commit 9c0a136
Show file tree
Hide file tree
Showing 14 changed files with 9,916 additions and 40 deletions.
1 change: 1 addition & 0 deletions NEWS.md
@@ -1,6 +1,7 @@
# hamstr 0.8.1

* Allow flat structure by setting K_factor > K_fine
* Update stan code to reflect new array syntax

# hamstr 0.8.0

Expand Down
3 changes: 1 addition & 2 deletions R/stanmodels.R
@@ -1,11 +1,10 @@
# Generated by rstantools. Do not edit by hand.

# names of stan models
stanmodels <- c("hamstr", "hamstr_newArray")
stanmodels <- c("hamstr")

# load each stan module
Rcpp::loadModule("stan_fit4hamstr_mod", what = TRUE)
Rcpp::loadModule("stan_fit4hamstr_newArray_mod", what = TRUE)

# instantiate each stanmodel object
stanmodels <- sapply(stanmodels, function(model_name) {
Expand Down
76 changes: 38 additions & 38 deletions README.md
Expand Up @@ -225,16 +225,16 @@ predict(hamstr_fit_1)
#> # A tibble: 396,000 × 3
#> iter depth age
#> <int> <dbl> <dbl>
#> 1 1 1.5 4488.
#> 2 1 2.5 4497.
#> 3 1 3.5 4505.
#> 4 1 4.5 4517.
#> 5 1 5.5 4527.
#> 6 1 6.5 4534.
#> 7 1 7.5 4542.
#> 8 1 8.5 4550.
#> 9 1 9.5 4559.
#> 10 1 10.5 4567.
#> 1 1 1.5 4517.
#> 2 1 2.5 4525.
#> 3 1 3.5 4534.
#> 4 1 4.5 4548.
#> 5 1 5.5 4559.
#> 6 1 6.5 4566.
#> 7 1 7.5 4574.
#> 8 1 8.5 4578.
#> 9 1 9.5 4585.
#> 10 1 10.5 4601.
#> # ℹ 395,990 more rows
```

Expand All @@ -245,16 +245,16 @@ summary(hamstr_fit_1)
#> # A tibble: 99 × 15
#> depth idx par mean se_mean sd `2.5%` `15.9%` `25%` `50%` `75%`
#> <dbl> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1.5 1 c_ages[1] 4510. 1.57 64.1 4367. 4449. 4472. 4516. 4554.
#> 2 2.5 2 c_ages[2] 4521. 1.43 59.9 4391. 4463. 4485. 4527. 4563.
#> 3 3.5 3 c_ages[3] 4533. 1.31 56.4 4414. 4477. 4497. 4537. 4571.
#> 4 4.5 4 c_ages[4] 4544. 1.19 53.6 4434. 4491. 4511. 4549. 4580.
#> 5 5.5 5 c_ages[5] 4556. 1.09 51.4 4450. 4505. 4523. 4559. 4590.
#> 6 6.5 6 c_ages[6] 4567. 1.01 49.3 4466. 4518. 4535. 4570. 4600.
#> 7 7.5 7 c_ages[7] 4578. 0.946 47.7 4482. 4530. 4547. 4581. 4610.
#> 8 8.5 8 c_ages[8] 4590. 0.911 46.6 4497. 4543. 4560. 4593. 4621.
#> 9 9.5 9 c_ages[9] 4603. 0.877 45.6 4511. 4558. 4573. 4605. 4633.
#> 10 10.5 10 c_ages[10] 4617. 0.828 43.9 4531. 4574. 4588. 4619. 4647.
#> 1 1.5 1 c_ages[1] 4512. 1.57 64.0 4374. 4449. 4472. 4517. 4557.
#> 2 2.5 2 c_ages[2] 4523. 1.43 60.0 4396. 4464. 4485. 4527. 4565.
#> 3 3.5 3 c_ages[3] 4534. 1.30 56.6 4415. 4478. 4497. 4537. 4574.
#> 4 4.5 4 c_ages[4] 4545. 1.19 53.9 4432. 4493. 4511. 4548. 4583.
#> 5 5.5 5 c_ages[5] 4556. 1.09 51.6 4448. 4506. 4523. 4558. 4592.
#> 6 6.5 6 c_ages[6] 4567. 0.992 49.5 4465. 4519. 4536. 4569. 4602.
#> 7 7.5 7 c_ages[7] 4578. 0.911 47.8 4479. 4532. 4548. 4580. 4612.
#> 8 8.5 8 c_ages[8] 4590. 0.860 46.7 4494. 4544. 4559. 4591. 4622.
#> 9 9.5 9 c_ages[9] 4602. 0.813 45.6 4510. 4558. 4572. 4604. 4634.
#> 10 10.5 10 c_ages[10] 4617. 0.758 44.0 4527. 4573. 4588. 4618. 4647.
#> # ℹ 89 more rows
#> # ℹ 4 more variables: `84.1%` <dbl>, `97.5%` <dbl>, n_eff <dbl>, Rhat <dbl>
```
Expand All @@ -279,14 +279,14 @@ summary(age.mods.interp)
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 0 NaN NA NA NA NA NA NA NA NA
#> 2 1 NaN NA NA NA NA NA NA NA NA
#> 3 2 4516. 61.9 4380. 4456. 4478. 4522. 4558. 4575. 4621.
#> 4 3 4527. 58.0 4404. 4471. 4491. 4532. 4566. 4583. 4628.
#> 5 4 4538. 54.9 4425. 4483. 4503. 4543. 4575. 4592. 4636.
#> 6 5 4550. 52.4 4441. 4498. 4517. 4554. 4585. 4600. 4644.
#> 7 6 4561. 50.3 4459. 4511. 4529. 4564. 4595. 4611. 4653.
#> 8 7 4573. 48.4 4474. 4524. 4541. 4576. 4605. 4620. 4661.
#> 9 8 4584. 47.0 4490. 4537. 4554. 4587. 4615. 4630. 4672.
#> 10 9 4596. 46.0 4505. 4550. 4566. 4599. 4627. 4642. 4684.
#> 3 2 4517. 61.9 4386. 4457. 4479. 4522. 4561. 4578. 4622.
#> 4 3 4528. 58.2 4405. 4471. 4492. 4532. 4569. 4586. 4629.
#> 5 4 4539. 55.1 4424. 4485. 4504. 4542. 4579. 4594. 4636.
#> 6 5 4551. 52.7 4441. 4499. 4517. 4553. 4588. 4603. 4644.
#> 7 6 4562. 50.5 4457. 4513. 4530. 4564. 4597. 4612. 4653.
#> 8 7 4573. 48.6 4472. 4526. 4542. 4574. 4607. 4621. 4662.
#> 9 8 4584. 47.2 4487. 4538. 4553. 4586. 4617. 4631. 4671.
#> 10 9 4596. 46.1 4502. 4551. 4565. 4597. 4628. 4642. 4682.
#> # ℹ 91 more rows
```

Expand All @@ -312,16 +312,16 @@ summary(hamstr_fit_1, type = "acc_rates")
#> # A tibble: 196 × 15
#> depth c_depth_top c_depth_bottom acc_rate_unit idx tau mean sd `2.5%`
#> <dbl> <dbl> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1.5 1.5 2.5 depth_per_ti… 1 0 156. 160. 30.3
#> 2 2.5 2.5 3.5 depth_per_ti… 2 0 138. 119. 32.1
#> 3 3.5 3.5 4.5 depth_per_ti… 3 0 132. 109. 32.7
#> 4 4.5 4.5 5.5 depth_per_ti… 4 0 121. 83.7 35.9
#> 5 5.5 5.5 6.5 depth_per_ti… 5 0 119. 80.3 36.7
#> 6 6.5 6.5 7.5 depth_per_ti… 6 0 122. 92.0 36.9
#> 7 7.5 7.5 8.5 depth_per_ti… 7 0 124. 96.7 35.9
#> 8 8.5 8.5 9.5 depth_per_ti… 8 0 97.1 52.1 35.6
#> 9 9.5 9.5 10.5 depth_per_ti… 9 0 82.7 41.0 32.6
#> 10 10.5 10.5 11.5 depth_per_ti… 10 0 78.3 40.7 30.2
#> 1 1.5 1.5 2.5 depth_per_ti… 1 0 165. 180. 31.4
#> 2 2.5 2.5 3.5 depth_per_ti… 2 0 146. 137. 32.8
#> 3 3.5 3.5 4.5 depth_per_ti… 3 0 142. 130. 32.1
#> 4 4.5 4.5 5.5 depth_per_ti… 4 0 130. 104. 35.7
#> 5 5.5 5.5 6.5 depth_per_ti… 5 0 125. 94.6 37.7
#> 6 6.5 6.5 7.5 depth_per_ti… 6 0 127. 90.7 36.6
#> 7 7.5 7.5 8.5 depth_per_ti… 7 0 129. 96.6 35.7
#> 8 8.5 8.5 9.5 depth_per_ti… 8 0 102. 56.0 36.0
#> 9 9.5 9.5 10.5 depth_per_ti… 9 0 85.3 43.9 33.2
#> 10 10.5 10.5 11.5 depth_per_ti… 10 0 80.4 42.7 30.4
#> # ℹ 186 more rows
#> # ℹ 6 more variables: `15.9%` <dbl>, `25%` <dbl>, `50%` <dbl>, `75%` <dbl>,
#> # `84.1%` <dbl>, `97.5%` <dbl>
Expand Down

0 comments on commit 9c0a136

Please sign in to comment.