## Load example expression data (variable "expression")
## for 23 transcripts and 41 samples, and associated
## phenotype (i.e. group) information (variable "groups")
data("example")
## The group data is encoded as a binary vector where
## 0s represent control samples (first 29 samples) and
## 1s represent disease samples (last 12 samples)
groups
## Neuronal reference signals (i.e. quantitative variable)
## and group-specific change in neuronal expression
## (i.e. interaction regressor)
neuron_probesets <- list(c("221805_at", "221801_x_at", "221916_at"),
"201313_at", "210040_at", "205737_at", "210432_s_at")
neuron_reference <- marker(expression, neuron_probesets)
neuron_difference <- groups * neuron_reference
## Fit an expression model containing neuronal expression and
## neuron-specific change in expression between control and
## disease samples
model <- lm(expression["202429_s_at",] ~ neuron_reference +
neuron_difference)
## Visualize the dependence on the neuronal reference signal and
## the group-specific effect (decreased neuronal expression in
## disease samples). Black and red dots represent control and
## disease samples, respectively.
crplot(model, "neuron_reference", g="neuron_difference")
Run the code above in your browser using DataLab