run_rcurvep()
create_dataset.Rd
The input dataset is created either by summarizing the response data or by simulating the response data.
create_dataset(d, n_samples = NULL, vdata = NULL)
d | Datasets with concentration-response data. Examples are zfishbeh and zfishdev. |
---|---|
n_samples | NULL (default) for not to simulate responses or an integer number to indicate the number of responses per concentration to simulate. |
vdata | NULL (default) for not to simulate responses or a vector of numeric responses in vehicle control wells to use as error. This parameter only works when n_samples is not NULL; an experimental feature. |
The original dataset with a new column, sample_id (if n_samples is not NULL) or the summarized dataset with columns as zfishbeh.
Curvep requires 1-to-1 concentration response relationship. For the dataset that does not meet the requirement, the following strategies are applied:
For dichotomous responses, percentage is reported (n_in/N*100).
For continuous responses, median value of responses per concentration is reported.
For dichotomous responses, bootstrap approach is used on the "n_in" vector to create a vector of percent response.
For continuous responses, options are a) direct sampling; b) responses from the linear fit using the original data + error of responses based on the supplied vehicle control data
# datasets with continuous response data data(zfishbeh) ## default d <- create_dataset(zfishbeh) ## add samples d <- create_dataset(zfishbeh, n_samples = 3) ## add samples and vdata d <- create_dataset(zfishbeh, n_samples = 3, vdata = rnorm(100)) # dataset with dichotomous response data data(zfishdev) ## default d <- create_dataset(zfishdev) ## add samples d <- create_dataset(zfishdev, n_samples = 3)