-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document custom longitudinal models (#318)
- Loading branch information
Showing
14 changed files
with
614 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
functions { | ||
// Provide definition for the dsld link function | ||
matrix link_dsld_contrib(matrix time, matrix link_function_inputs) { | ||
int nrow = rows(time); | ||
int ncol = cols(time); | ||
// broadcast input vectors to match the size of the time matrix | ||
matrix[nrow, ncol] baseline = rep_matrix(link_function_inputs[,1], ncol); | ||
matrix[nrow, ncol] shrinkage = rep_matrix(link_function_inputs[,2], ncol); | ||
matrix[nrow, ncol] growth = rep_matrix(link_function_inputs[,3], ncol); | ||
return growth - baseline .* shrinkage .* exp(- shrinkage .* time); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
transformed parameters { | ||
// Define matrix required for link functions | ||
matrix[n_subjects, 3] link_function_inputs; | ||
link_function_inputs[,1] = baseline_idv; | ||
link_function_inputs[,2] = shrinkage_idv; | ||
link_function_inputs[,3] = growth_idv; | ||
} |
Oops, something went wrong.