# Example 1:
# Create a dataset containing controls (which are named differently)
# from geninvitro dataset:
controldata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
"medium", "medium + BSA", "untreated"))
# Exclude controls (which are named differently) from geninvitro dataset:
invitrodata<-SubsetData(data=geninvitro, x="name", x.cat=c("control", "Control",
"medium", "medium + BSA", "untreated"), include=FALSE)
#
# Perform test for the monotonic trend in geninvitro, with DNA STRAND BREAKS
# as the endpoint, concentrations measured in "ug/cm2" and control doses
# measured in any units of measurement:
#
Isotest(data.nm=invitrodata, data.control=controldata, id="experimentID",
nano="name", response="value", dose="concentration", end="endpoint",
end.cat="DNA STRAND BREAKS", unit="concentration_unit", unit.cat="ug/cm2",
stat="E2", niter=1000, method="BH", control.opt="all", set.seed=1234)
#' # Example 2:
# Split geninvitro according to the endpoint and unit of the concentration
# and then perform test for the monotonic trend for each subset of data:
#
Isotest(data.nm=invitrodata, data.control=controldata,
id="experimentID", nano="name", dose="concentration",
response="value", stat="E2", niter=1000, method="BH", set.seed=1234,
vars=c("endpoint","concentration_unit"))
Run the code above in your browser using DataLab