[Simulx] Define endpoint element
Define or edit an endpoint. Endpoints summarize the outcome values over all individuals, for each simulation group and each replicate. Endpoints are defined as in Simulx GUI.
Usage
defineEndpoint(name, element)
Arguments
|
name |
(character) (required) Endpoint name. |
|
element |
(list) (required) List with the endpoint settings:
|
Details
To compute the defined endpoints, use runEndpoints and get the results with getEndpointsResults.
To specify if endpoints should be compared across simulation groups, use setGroupComparisonSettings. If group comparison is relevant, the way the comparison will be done for each endpoint (eg if statistical test and which p-value) should be defined in the endpoint element.
See also
Examples
# Endpoint with group comparison
initializeLixoftConnectors("simulx")
project_name <- file.path(getDemoPath(), "6.outcome_endpoints", "6.1.outcome_endpoints", "OutcomeEndpoint_PKPD_changeFromBaseline.smlx")
loadProject(project_name)
defineEndpoint(name = "comparison", element = list(outcome = "changeFromBaseline", metric = "geometricMean", groupComparison = list(type = "statisticalTest", operator = "!=", threshold = "0", pvalue = 0.05)))
# Combine multiple outcomes
initializeLixoftConnectors("simulx")
project_name <- file.path(getDemoPath(), "6.outcome_endpoints", "6.1.outcome_endpoints", "OutcomeEndpoint_PDTTE_survival_NADIR_timeToNADIR.smlx")
loadProject(project_name)
defineEndpoint(name = "combined_endpoint", element = list(outcome = list(names = c("Survival", "TimeToNADIR_AsEvent"), groupName = "combined", operator = "min")))