CausalKinetiX {CausalKinetiX} | R Documentation |
Applies CausalKinetiX framework to rank variables and models according to their stability.
CausalKinetiX(D, times, env, target, models = NA, pars = list())
D |
data matrix. Should have dimension n x (L*d), where n is the number of repetitions (over all experiments), L is the number of time points and d is the number of predictor variables. |
times |
vector of length L specifying the time points at which data was observed. |
env |
integer vector of length n encoding to which experiment each repetition belongs. |
target |
integer specifing which variable is the target. |
models |
list of models. Each model is specified by a list of vectors specifiying the variables included in the interactions of each term. If NA, then models are constructed automatically using the parameters in pars. |
pars |
list of the following parameters: Additionally all parameters used in CausalKinetiX.modelranking can also be specified here. |
For further details see the references.
object of class 'CausalKinetiX' consisting of the following elements
models |
list of the individually scored models. |
model.scores |
vector containing the score for each model. |
variable.scores |
vector containing the score of each variable. |
ranking |
vector specifying the ranking of each variable. |
Niklas Pfister, Stefan Bauer and Jonas Peters
Pfister, N., S. Bauer, J. Peters (2018). Identifying Causal Structure in Large-Scale Kinetic Systems ArXiv e-prints (arXiv:1810.11776).
The function CausalKinetiX.modelranking
can
be used if the variable ranking is not required.
## Generate data from Maillard reaction simulation.obj <- generate.data.maillard(target=6, env=rep(1:3, 5), L=15, seed=5, par.noise=list(noise.sd=1)) D <- simulation.obj$simulated.data time <- simulation.obj$time env <- simulation.obj$env target <- simulation.obj$target ## Fit data using CausalKinetiX ck.fit <- CausalKinetiX(D, time, env, target, pars=list(expsize=1, average.reps=TRUE)) # variable ranking (here the true parent is variable 4) print(ck.fit$ranking)