Git Product home page Git Product logo

gmcp's People

Contributors

floatofmath avatar kornl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

statneutrino

gmcp's Issues

Replace variables with other variables / terms

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

Example of unexpected simulated power result.

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

Setting: mu: 2,1,1,1,1, sigma: 1,1,1,1,1, n: 10,10,10,10,10

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

Investigate `java.lang.NoSuchMethodError: gdFlush`

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.

Is there a way to create non-LaTeX graphs outside of GUI?

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.

R CMD check with R devel gives note about DUP=FALSE

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

Reodering hypotheses doesn't work in the dialog for correlation matrix creation.

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)

[Question] Could you, please, cross-validate the calculation gMCP vs. Mediana in this scenario?

For this 2-family parallel gatekeeper with Hochberg truncated at: 0.5 in the 1st family and 1 (classic) in the 2nd family:

obraz

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)

obraz

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

Let's filter it:
obraz

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

sampSize: Parameter esf and allocation ratio

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.