signal: is a character object with names of columns of dataRaw to be treated as channel's input.
response: is a character vector with names of columns of dataRaw to be treated as channel's output
side_variables: (optional) is a character vector that indicates side variables' columns of data, if NULL no side variables are included
formula_string: (optional) is a character object that includes a formula syntax to use in logistic regression model. If NULL, a standard additive model of response variables is assumed. Only for advanced users.
output_path: is a directory where a pie chart with calculated probabilities will be saved. If NULL, the graph will not be created.
scale: is a logical indicating if the response variables should be scaled and centered before fitting logistic regression
lr_maxit: is a maximum number of iteration of fitting algorithm of logistic regression. Default is 1000.
MaxNWts: is a maximum acceptable number of weights in logistic regression algorithm. Default is 5000.
diagnostics: is a logical indicating if details of logistic regression fitting should be included in output list
Returns
a list with two elements:
outputprobmatr−an\times nmatrix,wheren$ is the number of inputs, with probabilities of correct discrimination between pairs of input values.
output$diagnostics - (if diagnostics=TRUE) a list corresponding to logistic regression models fitted for each pair of input values. Each element consists of three sub-elements: 1) nnet_model - nnet object summarising logistic regression model; 2) prob_lr - probabilities of assignment obtained from logistic regression model; 3) confusion_matrix - confusion matrix of classificator.
Details
In order to estimate PCDs, for a given pair of input values xi and xj, we propose to fit a logistic regression model using response data corresponding to the two considered inputs, i.e. yul, for l∈{i,j} and u ranging from 1 to nl. To ensure that both inputs have equal contribution to the calculated discriminability, equal probabilities should be assigned, P(X)=(P(xi),P(xj))=(1/2,1/2). Once the regression model is fitted, probability of assigning a given cellular response, y, to the correct input value is estimated as
max{P^lr(xi∣Y=y;P(X)),P^lr(xj∣Y=y;P(X))}.
Note that P(xj∣Y=y)=1−P(xi∣Y=y) as well as P^lr(xj∣Y=y;P(X))=1−P^lr(xi∣Y=y;P(X))
The average of the above probabilities over all observations yli yields PCDs
Additional parameters: lr_maxit and maxNWts are the same as in definition of multinom function from nnet package. An alternative model formula (using formula_string arguments) should be provided if data are not suitable for description by logistic regression (recommended only for advanced users). Preliminary scaling of data (argument scale) should be used similarly as in other data-driven approaches, e.g. if response variables are comparable, scaling (scale=FALSE) can be omitted, while if they represent different phenomenon (varying by units and/or magnitude) scaling is recommended.
References
[1] Jetka T, Nienaltowski K, Winarski T, Blonski S, Komorowski M, Information-theoretic analysis of multivariate single-cell signaling responses using SLEMI, PLoS Comput Biol, 15(7): e1007132, 2019, https://doi.org/10.1371/journal.pcbi.1007132.
Examples
## Calculate probabilities of discrimination for nfkb dataset it=21# choose from 0, 3, 6, ..., 120 for measurements at other time points output=prob_discr_pairwise(dataRaw=data_nfkb[data_nfkb$signal%in%c("0ng","1ng","100ng"),], signal ="signal", response = paste0("response_",it))