The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
This vignette covers basic use of package functions. Package data,
geo_tox_data
, is used throughout the examples and details
on how it was created can be found in the “GeoTox Package Data”
vignette.
NOTE: The sample size here is the size of the simulated population in each region. This is different than the sample size in the “package_data” vignette, which is used to generate
C_ss
values for each chemical at specified age and weight combinations.
Create GeoTox object, run simulations and computations
set.seed(2357)
geoTox <- GeoTox() |>
# Set region and group boundaries (for plotting)
set_boundaries(region = geo_tox_data$boundaries$county,
group = geo_tox_data$boundaries$state) |>
# Simulate populations for each region
simulate_population(age = split(geo_tox_data$age, ~FIPS),
obesity = geo_tox_data$obesity,
exposure = split(geo_tox_data$exposure, ~FIPS),
simulated_css = geo_tox_data$simulated_css,
n = n) |>
# Estimated Hill parameters
set_hill_params(geo_tox_data$dose_response |>
filter(endp == "TOX21_H2AX_HTRF_CHO_Agonist_ratio") |>
fit_hill(chem = "casn") |>
filter(!tp.sd.imputed, !logAC50.sd.imputed)) |>
# Calculate response
calculate_response() |>
# Perform sensitivity analysis
sensitivity_analysis()
geoTox
#> GeoTox object
#> Assays: 1
#> Chemicals: 5
#> Regions: 100
#> Population: 250
#> Data Fields:
#> Name Class Dim
#> age list(integer) 100 x (250)
#> IR list(numeric) 100 x (250)
#> obesity list(character) 100 x (250)
#> C_ext list(matrix) 100 x (250 x 21)
#> C_ss list(matrix) 100 x (250 x 21)
#> Computed Fields:
#> Name Class Dim
#> D_int list(matrix) 100 x (250 x 21)
#> C_invitro list(matrix) 100 x (250 x 21)
#> resp list(data.frame) 100 x (250 x 5)
#> sensitivity list(list) 5 x (100)
#> Other Fields: par, boundaries, exposure, css_sensitivity, hill_params
Plot outputs
Create GeoTox object, run simulations and computations
set.seed(2357)
geoTox <- GeoTox() |>
# Set region and group boundaries (for plotting)
set_boundaries(region = geo_tox_data$boundaries$county,
group = geo_tox_data$boundaries$state) |>
# Simulate populations for each region
simulate_population(age = split(geo_tox_data$age, ~FIPS),
obesity = geo_tox_data$obesity,
exposure = split(geo_tox_data$exposure, ~FIPS),
simulated_css = geo_tox_data$simulated_css,
n = n) |>
# Estimated Hill parameters
set_hill_params(geo_tox_data$dose_response |>
fit_hill(assay = "endp", chem = "casn") |>
filter(!tp.sd.imputed, !logAC50.sd.imputed)) |>
# Calculate response
calculate_response() |>
# Perform sensitivity analysis
sensitivity_analysis()
geoTox
#> GeoTox object
#> Assays: 13
#> Chemicals: 20
#> Regions: 100
#> Population: 250
#> Data Fields:
#> Name Class Dim
#> age list(integer) 100 x (250)
#> IR list(numeric) 100 x (250)
#> obesity list(character) 100 x (250)
#> C_ext list(matrix) 100 x (250 x 21)
#> C_ss list(matrix) 100 x (250 x 21)
#> Computed Fields:
#> Name Class Dim
#> D_int list(matrix) 100 x (250 x 21)
#> C_invitro list(matrix) 100 x (250 x 21)
#> resp list(data.frame) 100 x (3250 x 6)
#> sensitivity list(list) 5 x (100)
#> Other Fields: par, boundaries, exposure, css_sensitivity, hill_params
Plot outputs
The exposure map is the same for both single and multiple assay analyses. The map shows the distribution of chemical exposure across regions for all chemicals, not just those used in a particular analysis.
If other facet labels are present they can be specified using the
chem_label
argument.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.