kornl / gmcp Goto Github PK
View Code? Open in Web Editor NEWgMCP - Graph Based Multiple Comparison Procedures (an R package with a Java GUI)
Home Page: http://gsrmtp.r-forge.r-project.org/
gMCP - Graph Based Multiple Comparison Procedures (an R package with a Java GUI)
Home Page: http://gsrmtp.r-forge.r-project.org/
Hello, you may be aware of this already but gMCP has been archived on CRAN as of today (24FEB2018): https://cran.r-project.org/web/packages/gMCP/ . Are there plans to fix any issues the CRAN maintainers identified?
install_github("gMCP", "kornl")
Installing github repo(s) gMCP/master from kornl
Downloading gMCP.zip from https://github.com/kornl/gMCP/archive/master.zip
Installing package from /tmp/Rtmp9h5cXm/gMCP.zip
Fehler: Does not appear to be an R package (no DESCRIPTION)
It would be nice, if the GUI could replace variables with other variables / terms (not only numbers). Sometimes you want to replace \tau
with \epsilon
or another already existing variable or ...
Graph description is not always saved.
In the setting that follows, power for H2,H3,H4 and H5 should be the same due to the symmetry of graph and the same value of "mu".
Graph:
A graphMCP graph
H1 (weight=1)
H2 (weight=0)
H3 (weight=0)
H4 (weight=0)
H5 (weight=0)
Edges:
H1 -( 0.25 )-> H2
H1 -( 0.25 )-> H3
H1 -( 0.25 )-> H4
H1 -( 0.25 )-> H5
H2 -( 1 )-> H3
H3 -( 1 )-> H2
H4 -( 1 )-> H5
H5 -( 1 )-> H4
Local Power:
H1 H2 H3 H4 H5
1.0000 0.8738 0.8739 0.1926 0.1926
Expected number of rejections:
3.1329
Prob. to reject at least one hyp.:
1
Prob. to reject all hypotheses:
0
Big transition matrices: Horizontal JScrollBar is inside vertical JScrollPane (so you have to scroll down to scroll to the right/left)
And test GUI with big graphs like FerberTimeDose2011(doses=6, times=5)
in general.
Sometimes an error message java.lang.NoSuchMethodError: gdFlush
is printed on the console. (But as far as I'm told, the program nevertheless works fine.)
Is this some version incompatibility or am I doing something wrong? Not yet looked into this, since everything seems to be fine apart from the message.
graph2latex for entangled graphs
This example doesn't work actually:
If one is interested in the power to reject hypotheses 1 and 3 one could specifyf=list(function(x) {x[1] && x[3]})
Perhaps I missed this, but is there an easy way to turn the testing procedures into a graph without going into the GUI that can be used in other documents? The LaTeX ones look nice enough (while the GUI ones are less well suited for formal documents), but going via program output -> LaTeX -> pdf -> what I want seems a bit convoluted. E.g. the ability to just run a bit of code in a R session and get the graph in the graph window, or being able to automatically create a png/jpeg (or similar) from a batch script would be really nice.
* checking foreign function calls ... NOTE
Call with DUP = FALSE:
.C("cgMCP", oldM = as.double(m), oldW = as.double(w), p = as.double(p),
a = as.double(a), n = as.integer(n), s = double(n), m = double(n *
n), w = double(n), DUP = FALSE)
See the chapter ‘System and foreign language interfaces’ of the
‘Writing R Extensions’ manual.
Weight fields should not be enabled (editable) during interactive testing.
Graph description could be shown when selecting a graph object.
Reodering hypotheses doesn't work in the dialog for correlation matrix creation.
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
at java.util.Vector.get(Vector.java:744)
at org.af.gMCP.gui.datatable.RDataFrameRef.getColName(RDataFrameRef.java:22)
at org.af.gMCP.gui.datatable.DataTableModel.getColumnName(DataTableModel.java:27)
at javax.swing.JTable.addColumn(JTable.java:2801)
at javax.swing.JTable.createDefaultColumnsFromModel(JTable.java:1289)
at javax.swing.JTable.tableChanged(JTable.java:4386)
For this 2-family parallel gatekeeper with Hochberg truncated at: 0.5 in the 1st family and 1 (classic) in the 2nd family:
I get a discrepancy between gMCP and Mediana.
Mediana:
rawp <- c(0.01, 0.013, 0.01, 0.01)
family <- families(family1 = c(1, 2), family2 = c(3, 4))
gamma <- families(family1 = 0.5, family2 = 1)
AdjustPvalues(rawp,
proc = "ParallelGatekeepingAdj",
par = parameters(family = family,
proc = families(family1 ="HochbergAdj", family2 = "HochbergAdj"),
gamma = gamma))
[1] 0.01733333 0.01733333 0.01733333 0.01733333
gMCP with Simes test:
m <- rbind(H1=c(0, 0.5, 0.25, 0.25),
H2=c(0.5, 0, 0.25, 0.25),
H3=c(0, 0, 0, 1),
H4=c(0, 0, 1, 0))
weights <- c(0.5, 0.5, 0, 0)
graph <- new("graphMCP", m=m, weights=weights)
pvalues <- c(0.01, 0.013, 0.01, 0.01)
gMCP(graph, pvalues, test="Simes", alpha=0.05)
I get from the CTP:
Remaining hypotheses (new numbering):
1: H1
2: H2
3: H3
4: H4
Subset {4} (padj: 0.01): p_4=0.01<=a*(w_4) =0.05*(1)=0.05
Subset {3} (padj: 0.01): p_3=0.01<=a*(w_3) =0.05*(1)=0.05
Subset {3,4} (padj: 0.01): p_4=0.01<=a*(w_3+w_4) =0.05*(0.5+0.5)=0.05
Subset {2} (padj: 0.0173333333333333): p_2=0.013<=a*(w_2) =0.05*(0.75)=0.0375
Subset {2,4} (padj: 0.013): p_4=0.01<=a*(w_4) =0.05*(0.25)=0.0125
Subset {2,3} (padj: 0.013): p_3=0.01<=a*(w_3) =0.05*(0.25)=0.0125
Subset {2,3,4} (padj: 0.013): p_4=0.01<=a*(w_3+w_4) =0.05*(0.125+0.125)=0.0125
Subset {1} (padj: 0.0133333333333333): p_1=0.01<=a*(w_1) =0.05*(0.75)=0.0375
Subset {1,4} (padj: 0.01): p_4=0.01<=a*(w_1+w_4) =0.05*(0.75+0.25)=0.05
Subset {1,3} (padj: 0.01): p_3=0.01<=a*(w_1+w_3) =0.05*(0.75+0.25)=0.05
Subset {1,3,4} (padj: 0.01): p_4=0.01<=a*(w_1+w_3+w_4) =0.05*(0.75+0.125+0.125)=0.05
Subset {1,2} (padj: 0.013): p_2=0.013<=a*(w_1+w_2) =0.05*(0.5+0.5)=0.05
Subset {1,2,4} (padj: 0.013): p_4=0.01<=a*(w_1+w_4) =0.05*(0.5+0)=0.025
Subset {1,2,3} (padj: 0.013): p_3=0.01<=a*(w_1+w_3) =0.05*(0.5+0)=0.025
Subset {1,2,3,4} (padj: 0.013): p_4=0.01<=a*(w_1+w_3+w_4) =0.05*(0.5+0+0)=0.025
For the same parameters and Holm (Bonferroni's approach) it agrees.
EDIT: Checked also with multxpert:
F1 <- list(label = "F1", rawp=c(0.01, 0.013), proc = "Hochberg", procpar = 0.5)
F2 <- list(label = "F2", rawp=c(0.01, 0.01), proc = "Hochberg", procpar = 1)
multxpert::pargateadjp(gateproc = list(F1, F2), independence = TRUE, printDecisionRules=TRUE)
Hypothesis testing problem
Global familywise error rate=0.05
Independence condition is imposed (the families are tested from first to last)
Family 1 (F1) is tested using Hochberg procedure (truncation parameter=0.5) at alpha1=0.05.
Null hypothesis 1 (raw p-value=0.01) is rejected.
Null hypothesis 2 (raw p-value=0.013) is rejected.
Details on the decision rule for this family can be obtained by running the PValAdjP function for Hochberg procedure with gamma=0.5 and alpha=0.05.
One or more null hypotheses are rejected in Family 1 and the parallel gatekeeping procedure passes this family. Based on the error rate function of Hochberg procedure (truncation parameter=0.5), alpha2=0.05 is carried over to Family 2.
Family 2 (F2) is tested using Hochberg procedure (truncation parameter=1) at alpha2=0.05.
Null hypothesis 3 (raw p-value=0.01) is rejected.
Null hypothesis 4 (raw p-value=0.01) is rejected.
Details on the decision rule for this family can be obtained by running the PValAdjP function for Hochberg procedure with gamma=1 and alpha=0.05.
Family Procedure Parameter Raw.pvalue Adj.pvalue
1 F1 Hochberg 0.5 0.010 0.0173
2 F1 Hochberg 0.5 0.013 0.0173
3 F2 Hochberg 1.0 0.010 0.0173
4 F2 Hochberg 1.0 0.010 0.0173
Calculate adjusted p-values with option upscale=TRUE
.
Simes + parametric test + adjusted p-values for entangled graphs or disable them (like CI should).
In the (still experimental?) function sampSize(), the parameter esf is not documented. The function calls the internal function sampSizeCore(), which has parameters for allocation ratio (alRatio) and type of desired output (Ntype), which is "total" or "arm". However, these parameters are currently not used by sampSize(). If I am not mistaken, the obtained result is the total sample size. Furthermore, the undocumented parameter esf seems to be a function of the allocation ratio, which can be observed by using the respective option in the GUI and checking the resulting code. It would be nice if the sampSize() function offered the possibility to 1) specify the allocation ratio directly, 2) specify if the output should give the sample size per arm or in total.
I am not sure how cumbersome it would be to modify the function. I had originally made a suggestion, but in the meanwhile I realized that that would only cover the case with 2 treatment arms. For cases with >2 arms, we would also need to input the number of arms as well as the information on which arms contribute to which node. For my personal use, I have written such a function, taking the basic algorithm from the Java code used in the GUI.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.