CausalKinetiX.modelranking {CausalKinetiX}R Documentation



Applies CausalKinetiX framework to rank a list models according to their stability.


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



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.


vector of length L specifying the time points at which data was observed.


integer vector of length n encoding to which experiment each repetition belongs.


integer specifing which variable is the target.


list of models. Each model is specified by a list of vectors specifiying the variables included in the interactions of each term.


list of the following parameters: (default 2) specifies the penalization degree in the smoothing spline, num.folds (default 2) number of folds used in cross-validation of smoothing spline, include.vars (default NA) specifies variables that should be included in each model, include.intercept (default FALSE) specifies whether to include a intercept in models, average.reps (default FALSE) specifies whether to average repetitions in each environment, smooth.X (default FALSE) specifies whether to smooth predictor observations before fitting, smooth.Y (default FALSE) specifies whether to smooth target observations before fitting, regression.class (default OLS) other options are signed.OLS, optim, random.forest, sample.splitting (default "loo") either leave-one-out (loo) or no splitting (none), score.type (default "mean_absolute") specifies the type of score funtion to use (note that "mean" and "max" are proportional scores which should be used if the noise variance is expected to change across experiments, if this is not the case "mean_absolute" and "max_absolute" are prefered as they also work for perfect unconstrained spline fits), integrated.model (default TRUE) specifies whether to fit the integrated or the derived model, splitting.env (default NA) an additonal environment vector used for scoring, weight.vec (default rep(1, length(env)) a weight vector used when scoring.type=="weighted.mean", set.initial (default FALSE) specifies whether to fix the initial value, silent (default TRUE) turn of additional output, show.plot (default FALSE) show diagnostic plots.


This function scores a specified list of models and does not include a variable ranking.


returns a list with the entries "scores" and "parameter"


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

See Also

The function CausalKinetiX is a wrapper for this function that also computes the variable ranking and generates sensible classes of models.


## Generate data from Maillard reaction
simulation.obj <-,
                                         env=rep(1:5, 3),
D <- simulation.obj$
time <- simulation.obj$time
env <- simulation.obj$env
target <- simulation.obj$target

## Fit data to the following two models using CausalKinetiX:
## 1: dy = theta_1*x_1 + theta_2*x_2 + theta_3*x_1*x_10 (true model)
## 2: dy = theta_1*x_2 + theta_2*x_4 + theta_3*x_3*x_10 (wrong model) <- CausalKinetiX.modelranking(D, time, env, target,
                                     list(list(1, 2, c(1, 10)), list(2, 4, c(3, 10))))

[Package CausalKinetiX version 0.2.1 Index]