CausalKinetiX {CausalKinetiX}R Documentation

CausalKinetiX

Description

Applies CausalKinetiX framework to rank variables and models according to their stability.

Usage

CausalKinetiX(D, times, env, target, models = NA, pars = list())

Arguments

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: max.preds (default FALSE) if TRUE also models with lower terms included, expsize (default 2) the expected number of terms, interactions (default FALSE) specifies whether to include interactions in the models, products (default FALSE) specifies whether to include products in the models, include.vars (default NA) specifies variables that should be included in each model, maineffect.models (default FALSE) main-effect models or exhaustive models, screening (default NA) specifies the number of terms remaining after screening - NA implies screening, K (default NA) cutoff parameter used in variable ranking.

Additionally all parameters used in CausalKinetiX.modelranking can also be specified here.

Details

For further details see the references.

Value

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.

Author(s)

Niklas Pfister, Stefan Bauer and Jonas Peters

References

Pfister, N., S. Bauer, J. Peters (2018). Identifying Causal Structure in Large-Scale Kinetic Systems ArXiv e-prints (arXiv:1810.11776).

See Also

The function CausalKinetiX.modelranking can be used if the variable ranking is not required.

Examples


## 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)

[Package CausalKinetiX version 0.2.1 Index]