Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/interventionalInferenceAdvanced.R

This function performs exact Bayesian inference for dynamic Bayesian networks using microarray timecourse data. Several intervention models can be chosen to take into account the effect of inhibitors.

1 2 3 4 5 | ```
interventionalInferenceAdvanced(y, X0, X1, cond, inhibition, inhibitors, max.indeg,
g = NULL, Sigma = NULL, inferParents = NULL, allowSelfEdges = TRUE,
perfect = FALSE, fixedEffect = FALSE, mechanismChange = FALSE,
priorType = "uninformed", priorGraph = NULL, priorStrength = 3,
fittedValues = FALSE)
``` |

`y` |
an |

`X0` |
an |

`X1` |
an |

`cond` |
an |

`inhibition` |
a |

`inhibitors` |
an |

`max.indeg` |
The maximum permitted in-degree for each node. |

`g` |
The constant |

`Sigma` |
an |

`inferParents` |
a vector of node indices specifying which nodes to infer parents for. If omitted, parents are inferred for all nodes. |

`allowSelfEdges` |
Should self-edges be allowed? |

`perfect` |
Apply perfect-out interventions? |

`fixedEffect` |
Apply fixed-effect-out interventions? |

`mechanismChange` |
Apply mechanism-change-out interventions? Note: cannot be applied with perfect interventions. |

`priorType` |
One of |

`priorGraph` |
A |

`priorStrength` |
The prior strength parameter. Ignored (but don't set it to NA) if |

`fittedValues` |
Perform a second pass to calculate the fitted values? |

The function `interventionalInference`

provides a simpler, but less general way of coding which inhibitors are active in each condition.
Currently this advanced version only supports -out forms of the interventions.
By default the fixed effects in the fixedEffect intervention are assumed to be additive in samples with multiple inhibitors.
However if you do not wish for this to be the case, then you can simply define a dummy inhibitor for each combination of inhibitors and a new fixed effect parameter will be estimated.
See example 7 below.

`pep` |
A |

`MAP` |
A |

`parentSets` |
A |

`ll` |
A |

`lpost` |
A |

`MAPprob` |
A |

`MAPmodel` |
A |

`marginal.likelihood` |
A |

`ebPriorStrength` |
Value of |

`yhat` |
The posterior expected fitted values, if |

`inputs` |
A list containing the inputs to |

Simon Spencer

Spencer, S.E.F, Hill, S.M. and Mukherjee, S. (2012) Dynamic Bayesian networks for interventional data. CRiSM pre-print 12-24.

Mukherjee, S. and Speed, T.P. Network inference using informative priors. Proc. Nat. Acad. Sci. USA, 105, 14313-14318.

`interventionalDBN-package`

, `interventionalInference`

, `formatData`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | ```
library(interventionalDBN)
data(interventionalData)# loads interventionalData.
# Load your own data spreadsheet using myData<-read.csv("myDataFile.csv").
# Format the data for network inference
d<-formatData(interventionalData)
# Perform network inference without modelling interventions.
myNetwork0<-interventionalInferenceAdvanced(d$y,d$X0,d$X1,max.indeg=3,fittedValues=TRUE)
# EGFRi is active in conditions 2 and 4, AKTi is active in conditions 3 and 4.
myInhibition<-cbind(c(0,1,0,1),c(0,0,1,1))
myInhibitors<-matrix(0,2,15)
myInhibitors[1,1]<-1 # EGFRi targets EGFR (node 1).
myInhibitors[2,8]<-1 # AKTi targets AKT (node 8).
# Perform network inference with perfect and fixed effect interventions.
myNetwork1<-interventionalInferenceAdvanced(d$y,d$X0,d$X1,d$cond,max.indeg=3,
inhibition=myInhibition,inhibitors=myInhibitors,perfect=TRUE,fixedEffect=TRUE)
# Perform network inference on with mechanism change interventions.
myNetwork2<-interventionalInferenceAdvanced(d$y,d$X0,d$X1,d$cond,max.indeg=3,
inhibition=myInhibition,inhibitors=myInhibitors,mechanismChange=TRUE)
# Perform network inference with Mukherjee Prior that prefers to omit self-edges.
myNetwork3<-interventionalInferenceAdvanced(d$y,d$X0,d$X1,d$cond,max.indeg=3,
inhibition=myInhibition,inhibitors=myInhibitors,perfect=TRUE,fixedEffect=TRUE,
priorType="Mukherjee",priorGraph=matrix(1,15,15)-diag(rep(1,15)),priorStrength=2)
# Compare with self-edge peps with myNetwork1
diag(myNetwork1$pep)-diag(myNetwork3$pep)
# Perform network inference with Hamming Prior that prefers self-edges,
# and use Empirical Bayes to choose the priorStrength.
myNetwork4<-interventionalInferenceAdvanced(d$y,d$X0,d$X1,d$cond,max.indeg=3,
inhibition=myInhibition,inhibitors=myInhibitors,perfect=TRUE,fixedEffect=TRUE,
priorType="Hamming",priorGraph=diag(rep(1,15)),priorStrength=0:10/2)
# You should always check to see if the Empirical Bayes appears to be working.
plotMaxML(myNetwork4)
# Now let's try using using the gradients as the response.
# Note that we have to tranfser Sigma this time, as it is no longer the identity.
d<-formatData(interventionalData,gradients=TRUE,initialIntercept=FALSE)
# Perform network inference on gradients with perfect-out interventions.
myNetwork5<-interventionalInferenceAdvanced(d$y,d$X0,d$X1,d$cond,max.indeg=3,
Sigma=d$Sigma,inhibition=myInhibition,inhibitors=myInhibitors,perfect=TRUE)
# So far we have assumed that the fixed effects are additive in EGFRi+AKTi.
# Now let's change this, by coding EGFRi+AKTi as a separate inhibitor.
d<-formatData(interventionalData)
# EGFRi+AKTi is active in condition 4.
myInhibition<-cbind(c(0,1,0,0),c(0,0,1,0),c(0,0,0,1))
myInhibitors<-matrix(0,3,15)
myInhibitors[1,1]<-1 # EGFRi targets EGFR (node 1).
myInhibitors[2,8]<-1 # AKTi targets AKT (node 8).
myInhibitors[3,c(1,8)]<-1 # EGFRi+AKTi targets both.
# Perform network inference on gradients with fixed effect interventions.
myNetwork7<-interventionalInferenceAdvanced(d$y,d$X0,d$X1,d$cond,max.indeg=3,
inhibition=myInhibition,inhibitors=myInhibitors,fixedEffect=TRUE)
``` |

interventionalDBN documentation built on May 30, 2017, 8:24 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.