Last data update: 2014.03.03
R: Extract the posterior probabilities of response from a MIMOSA...
Extract the posterior probabilities of response from a MIMOSA model
Description
Extract the posterior probabilities of response from a MIMOSA model
Extract the component weights from a MIMOSA model
Usage
getZ(x)
## S3 method for class 'MIMOSAResultList'
getZ(x)
## S3 method for class 'MIMOSAResult'
getZ(x)
getW(x)
## S3 method for class 'MIMOSAResultList'
getW(x)
## S3 method for class 'MIMOSAResult'
getW(x)
Arguments
x
output from a MIMOSA model
Value
a matrix
of posterior probabilities
a vector
of component weights
Examples
data(ICS)
E<-ConstructMIMOSAExpressionSet(ICS,
reference=ANTIGEN%in%'negctrl',measure.columns=c('CYTNUM','NSUB'),
other.annotations=c('CYTOKINE','TCELLSUBSET','ANTIGEN','UID'),
default.cast.formula=component~UID+ANTIGEN+CYTOKINE+TCELLSUBSET,
.variables=.(TCELLSUBSET,CYTOKINE,UID),
featureCols=1,ref.append.replace='_REF')
result<-MIMOSA(NSUB+CYTNUM~UID+TCELLSUBSET+CYTOKINE|ANTIGEN,
data=E, method='EM',
subset=RefTreat%in%'Treatment'&ANTIGEN%in%'ENV',
ref=ANTIGEN%in%'ENV'&RefTreat%in%'Reference')
getZ(result)
data(ICS)
E<-ConstructMIMOSAExpressionSet(ICS,
reference=ANTIGEN%in%'negctrl',measure.columns=c('CYTNUM','NSUB'),
other.annotations=c('CYTOKINE','TCELLSUBSET','ANTIGEN','UID'),
default.cast.formula=component~UID+ANTIGEN+CYTOKINE+TCELLSUBSET,
.variables=.(TCELLSUBSET,CYTOKINE,UID),
featureCols=1,ref.append.replace='_REF')
result<-MIMOSA(NSUB+CYTNUM~UID+TCELLSUBSET+CYTOKINE|ANTIGEN,
data=E, method='EM',
subset=RefTreat%in%'Treatment'&ANTIGEN%in%'ENV',
ref=ANTIGEN%in%'ENV'&RefTreat%in%'Reference')
getW(result)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MIMOSA)
Loading required package: MASS
Loading required package: plyr
Loading required package: reshape
Attaching package: 'reshape'
The following objects are masked from 'package:plyr':
rename, round_any
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: ggplot2
This is package 'modeest' written by P. PONCET.
For a complete list of functions, use 'library(help = "modeest")' or 'help.start()'.
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/MIMOSA/MIMOSA-accessors.Rd_%03d_medium.png", width=480, height=480)
> ### Name: getZ
> ### Title: Extract the posterior probabilities of response from a MIMOSA
> ### model
> ### Aliases: getW getW.MIMOSAResult getW.MIMOSAResultList getZ
> ### getZ.MIMOSAResult getZ.MIMOSAResultList
>
> ### ** Examples
>
> data(ICS)
> E<-ConstructMIMOSAExpressionSet(ICS,
+ reference=ANTIGEN%in%'negctrl',measure.columns=c('CYTNUM','NSUB'),
+ other.annotations=c('CYTOKINE','TCELLSUBSET','ANTIGEN','UID'),
+ default.cast.formula=component~UID+ANTIGEN+CYTOKINE+TCELLSUBSET,
+ .variables=.(TCELLSUBSET,CYTOKINE,UID),
+ featureCols=1,ref.append.replace='_REF')
>
> result<-MIMOSA(NSUB+CYTNUM~UID+TCELLSUBSET+CYTOKINE|ANTIGEN,
+ data=E, method='EM',
+ subset=RefTreat%in%'Treatment'&ANTIGEN%in%'ENV',
+ ref=ANTIGEN%in%'ENV'&RefTreat%in%'Reference')
Warning message:
In .local(formula, data, ...) :
Formula does not contain the RefTreat variable. It will be added automatically. Set RT=FALSE to disable this.
> getZ(result)
Pr.Nonresponse Pr.response
1_ENV_IFNg_CD4_Treatment 1.000000e+00 0.00000000
1_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
1_ENV_IL2_CD4_Treatment 9.824234e-01 0.01757658
2_ENV_IFNg_CD4_Treatment 8.827129e-01 0.11728714
2_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
2_ENV_IL2_CD4_Treatment 9.829209e-01 0.01707909
3_ENV_IFNg_CD4_Treatment 3.536033e-01 0.64639668
3_ENV_TNF_CD4_Treatment 6.984997e-01 0.30150033
3_ENV_IL2_CD4_Treatment 9.824234e-01 0.01757658
4_ENV_IFNg_CD4_Treatment 1.000000e+00 0.00000000
4_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
4_ENV_IL2_CD4_Treatment 1.000000e+00 0.00000000
5_ENV_IFNg_CD4_Treatment 1.000000e+00 0.00000000
5_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
5_ENV_IL2_CD4_Treatment 4.782255e-01 0.52177452
6_ENV_IFNg_CD4_Treatment 5.736120e-01 0.42638798
6_ENV_TNF_CD4_Treatment 9.550749e-01 0.04492506
6_ENV_IL2_CD4_Treatment 9.958351e-01 0.00416487
7_ENV_IFNg_CD4_Treatment 9.829209e-01 0.01707909
7_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
7_ENV_IL2_CD4_Treatment 9.829209e-01 0.01707909
8_ENV_IFNg_CD4_Treatment 1.000000e+00 0.00000000
8_ENV_TNF_CD4_Treatment 6.984997e-01 0.30150033
8_ENV_IL2_CD4_Treatment 9.824234e-01 0.01757658
9_ENV_IFNg_CD4_Treatment 1.000000e+00 0.00000000
9_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
9_ENV_IL2_CD4_Treatment 1.000000e+00 0.00000000
10_ENV_IFNg_CD4_Treatment 9.423974e-01 0.05760256
10_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
10_ENV_IL2_CD4_Treatment 1.000000e+00 0.00000000
11_ENV_IFNg_CD4_Treatment 9.829209e-01 0.01707909
11_ENV_TNF_CD4_Treatment 4.645457e-01 0.53545435
11_ENV_IL2_CD4_Treatment 7.908779e-01 0.20912209
12_ENV_IFNg_CD4_Treatment 7.682250e-01 0.23177500
12_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
12_ENV_IL2_CD4_Treatment 6.984997e-01 0.30150033
13_ENV_IFNg_CD4_Treatment 9.824234e-01 0.01757658
13_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
13_ENV_IL2_CD4_Treatment 1.000000e+00 0.00000000
14_ENV_IFNg_CD4_Treatment 7.908779e-01 0.20912209
14_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
14_ENV_IL2_CD4_Treatment 9.958351e-01 0.00416487
15_ENV_IFNg_CD4_Treatment 8.336719e-01 0.16632811
15_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
15_ENV_IL2_CD4_Treatment 1.000000e+00 0.00000000
16_ENV_IFNg_CD4_Treatment 8.926461e-01 0.10735394
16_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
16_ENV_IL2_CD4_Treatment 1.000000e+00 0.00000000
17_ENV_IFNg_CD4_Treatment 1.000000e+00 0.00000000
17_ENV_TNF_CD4_Treatment 8.827129e-01 0.11728714
17_ENV_IL2_CD4_Treatment 9.958351e-01 0.00416487
18_ENV_IFNg_CD4_Treatment 9.240638e-01 0.07593623
18_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
18_ENV_IL2_CD4_Treatment 1.000000e+00 0.00000000
19_ENV_IFNg_CD4_Treatment 8.336719e-01 0.16632811
19_ENV_TNF_CD4_Treatment 8.336719e-01 0.16632811
19_ENV_IL2_CD4_Treatment 1.000000e+00 0.00000000
20_ENV_IFNg_CD4_Treatment 9.829209e-01 0.01707909
20_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
20_ENV_IL2_CD4_Treatment 9.150162e-01 0.08498383
21_ENV_IFNg_CD4_Treatment 1.000000e+00 0.00000000
21_ENV_TNF_CD4_Treatment 9.958351e-01 0.00416487
21_ENV_IL2_CD4_Treatment 1.000000e+00 0.00000000
22_ENV_IFNg_CD4_Treatment 1.000000e+00 0.00000000
22_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
22_ENV_IL2_CD4_Treatment 9.423974e-01 0.05760256
23_ENV_IFNg_CD4_Treatment 9.581739e-01 0.04182607
23_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
23_ENV_IL2_CD4_Treatment 1.000000e+00 0.00000000
24_ENV_IFNg_CD4_Treatment 1.000000e+00 0.00000000
24_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
24_ENV_IL2_CD4_Treatment 1.000000e+00 0.00000000
25_ENV_IFNg_CD4_Treatment 9.550749e-01 0.04492506
25_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
25_ENV_IL2_CD4_Treatment 8.926461e-01 0.10735394
26_ENV_IFNg_CD4_Treatment 8.662913e-01 0.13370867
26_ENV_TNF_CD4_Treatment 5.072861e-02 0.94927139
26_ENV_IL2_CD4_Treatment 3.111928e-06 0.99999689
27_ENV_IFNg_CD4_Treatment 8.336719e-01 0.16632811
27_ENV_TNF_CD4_Treatment 8.131860e-01 0.18681404
27_ENV_IL2_CD4_Treatment 4.311005e-10 1.00000000
28_ENV_IFNg_CD4_Treatment 8.373263e-01 0.16267367
28_ENV_TNF_CD4_Treatment 7.114246e-02 0.92885754
28_ENV_IL2_CD4_Treatment 4.204602e-01 0.57953977
29_ENV_IFNg_CD4_Treatment 2.405958e-01 0.75940419
29_ENV_TNF_CD4_Treatment 6.402921e-06 0.99999360
29_ENV_IL2_CD4_Treatment 1.336568e-06 0.99999866
30_ENV_IFNg_CD4_Treatment 7.114246e-02 0.92885754
30_ENV_TNF_CD4_Treatment 3.833105e-01 0.61668952
30_ENV_IL2_CD4_Treatment 4.563989e-08 0.99999995
31_ENV_IFNg_CD4_Treatment 3.015652e-01 0.69843478
31_ENV_TNF_CD4_Treatment 1.754294e-01 0.82457055
31_ENV_IL2_CD4_Treatment 4.411419e-01 0.55885814
32_ENV_IFNg_CD4_Treatment 5.736120e-01 0.42638798
32_ENV_TNF_CD4_Treatment 1.731429e-01 0.82685711
32_ENV_IL2_CD4_Treatment 2.947900e-10 1.00000000
33_ENV_IFNg_CD4_Treatment 1.731429e-01 0.82685711
33_ENV_TNF_CD4_Treatment 6.984997e-01 0.30150033
33_ENV_IL2_CD4_Treatment 1.060254e-07 0.99999989
34_ENV_IFNg_CD4_Treatment 6.288888e-01 0.37111118
34_ENV_TNF_CD4_Treatment 5.880287e-04 0.99941197
34_ENV_IL2_CD4_Treatment 8.526513e-13 1.00000000
35_ENV_IFNg_CD4_Treatment 7.114246e-02 0.92885754
35_ENV_TNF_CD4_Treatment 1.520919e-02 0.98479081
35_ENV_IL2_CD4_Treatment 1.457582e-04 0.99985424
36_ENV_IFNg_CD4_Treatment 3.696601e-01 0.63033992
36_ENV_TNF_CD4_Treatment 1.000000e+00 0.00000000
36_ENV_IL2_CD4_Treatment 1.728072e-04 0.99982719
37_ENV_IFNg_CD4_Treatment 9.240638e-01 0.07593623
37_ENV_TNF_CD4_Treatment 4.645457e-01 0.53545435
37_ENV_IL2_CD4_Treatment 3.718696e-10 1.00000000
38_ENV_IFNg_CD4_Treatment 7.712187e-01 0.22878132
38_ENV_TNF_CD4_Treatment 3.380742e-03 0.99661926
38_ENV_IL2_CD4_Treatment 1.082645e-03 0.99891736
39_ENV_IFNg_CD4_Treatment 9.150162e-01 0.08498383
39_ENV_TNF_CD4_Treatment 9.344393e-05 0.99990656
39_ENV_IL2_CD4_Treatment 3.336983e-02 0.96663017
40_ENV_IFNg_CD4_Treatment 9.581739e-01 0.04182607
40_ENV_TNF_CD4_Treatment 3.943879e-05 0.99996056
40_ENV_IL2_CD4_Treatment 5.737215e-07 0.99999943
41_ENV_IFNg_CD4_Treatment 9.550749e-01 0.04492506
41_ENV_TNF_CD4_Treatment 9.865278e-05 0.99990135
41_ENV_IL2_CD4_Treatment 1.578883e-09 1.00000000
42_ENV_IFNg_CD4_Treatment 1.585238e-05 0.99998415
42_ENV_TNF_CD4_Treatment 2.875831e-03 0.99712417
42_ENV_IL2_CD4_Treatment 5.630487e-03 0.99436951
43_ENV_IFNg_CD4_Treatment 1.731429e-01 0.82685711
43_ENV_TNF_CD4_Treatment 6.327018e-01 0.36729817
43_ENV_IL2_CD4_Treatment 1.578883e-09 1.00000000
44_ENV_IFNg_CD4_Treatment 1.731429e-01 0.82685711
44_ENV_TNF_CD4_Treatment 4.211118e-03 0.99578888
44_ENV_IL2_CD4_Treatment 1.676607e-02 0.98323393
45_ENV_IFNg_CD4_Treatment 2.482732e-04 0.99975173
45_ENV_TNF_CD4_Treatment 3.743983e-02 0.96256017
45_ENV_IL2_CD4_Treatment 2.046363e-12 1.00000000
46_ENV_IFNg_CD4_Treatment 8.362933e-01 0.16370674
46_ENV_TNF_CD4_Treatment 6.290533e-04 0.99937095
46_ENV_IL2_CD4_Treatment 8.917027e-10 1.00000000
47_ENV_IFNg_CD4_Treatment 1.818684e-01 0.81813158
47_ENV_TNF_CD4_Treatment 9.180255e-02 0.90819745
47_ENV_IL2_CD4_Treatment 1.312110e-05 0.99998688
48_ENV_IFNg_CD4_Treatment 1.000000e+00 0.00000000
48_ENV_TNF_CD4_Treatment 4.130457e-03 0.99586954
48_ENV_IL2_CD4_Treatment 1.057953e-06 0.99999894
49_ENV_IFNg_CD4_Treatment 8.336719e-01 0.16632811
49_ENV_TNF_CD4_Treatment 2.033035e-02 0.97966965
49_ENV_IL2_CD4_Treatment 6.089826e-06 0.99999391
50_ENV_IFNg_CD4_Treatment 8.336719e-01 0.16632811
50_ENV_TNF_CD4_Treatment 1.818684e-01 0.81813158
50_ENV_IL2_CD4_Treatment 5.484168e-04 0.99945158
> data(ICS)
> E<-ConstructMIMOSAExpressionSet(ICS,
+ reference=ANTIGEN%in%'negctrl',measure.columns=c('CYTNUM','NSUB'),
+ other.annotations=c('CYTOKINE','TCELLSUBSET','ANTIGEN','UID'),
+ default.cast.formula=component~UID+ANTIGEN+CYTOKINE+TCELLSUBSET,
+ .variables=.(TCELLSUBSET,CYTOKINE,UID),
+ featureCols=1,ref.append.replace='_REF')
>
> result<-MIMOSA(NSUB+CYTNUM~UID+TCELLSUBSET+CYTOKINE|ANTIGEN,
+ data=E, method='EM',
+ subset=RefTreat%in%'Treatment'&ANTIGEN%in%'ENV',
+ ref=ANTIGEN%in%'ENV'&RefTreat%in%'Reference')
> getW(result)
ENV
w.nonresp 0.5936961
w.resp 0.4063039
>
>
>
>
>
> dev.off()
null device
1
>