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

Power model add #13

Merged
merged 8 commits into from
Apr 19, 2024
Merged

Power model add #13

merged 8 commits into from
Apr 19, 2024

Conversation

Tess-LaCoil
Copy link
Collaborator

Added the power law model.

@Tess-LaCoil Tess-LaCoil requested review from dfalster and fontikar April 9, 2024 11:35
Copy link
Collaborator

@fontikar fontikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me! Nice work so glad we have a workflow now! :D Have no viewed Stan files in much detail, @dfalster can we lean on you for that please? 🙏

Copy link
Member

@dfalster dfalster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work Tess. Looks great. However, I suggest we write power law as dx/dt = a (x/x_c)^b. Your implementation has x_c=1. a general guide would be that x_c ~= mean(x), but rather than estimating from the data, it would be better to set this in the model setup as a specified quantify. Without this, the slope and intercept become heavily correlated and hard to converge.

… references in helper functions for testing and data generation.
@Tess-LaCoil
Copy link
Collaborator Author

Changes to power law model done. @dfalster I don't know if the data generation process is sane as I produce y_bar values and pass them along with the other DE parameters to used to determine true sizes over time. Those true values also get passed to the model, but I assume in practice these would be estimated from the data or something.

@Tess-LaCoil Tess-LaCoil requested a review from dfalster April 10, 2024 05:47
Copy link
Member

@dfalster dfalster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry , more changes!

inst/stan/power_multi_ind.stan Outdated Show resolved Hide resolved
inst/stan/power_multi_ind.stan Outdated Show resolved Hide resolved
Tess-LaCoil and others added 3 commits April 10, 2024 19:06
…_bar, including the data generation process. Currently fails to properly estimate coefficient parameter for single individual.
…er functions to use map rather than for loop.
@Tess-LaCoil Tess-LaCoil requested a review from dfalster April 18, 2024 00:34
@Tess-LaCoil Tess-LaCoil merged commit e049daf into master Apr 19, 2024
6 checks passed
@Tess-LaCoil Tess-LaCoil deleted the power-model-add branch April 19, 2024 01:07
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