New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contrasts #23
Comments
@nicholst, great input, thanks again for putting us back on track. So we'll need more time to first do more reading and second, have more use cases on how those terms would be used (context, query) in order to justify the additions. Do you have examples you could point us too? bw. |
I'm not sure I understand about use cases. Do you mean examples of contrast vectors that don't sum to one? For whatever quirks of history, the brain imaging community 'rolls their own' design matrices and contrast vectors to do linear modelling and inference. That's the only reason we're modelling it; here are some book chapters on the G(eneral)LM and contrasts that show how that community uses contrasts. In R, people touch contrasts only through setting of the default, i.e. Does this help at all? |
@nicholst , I meant how you intend to use STATO classes covering those elements for annotation purpose. What is that you need to tag with STATO uri, what kind of SPARQL query would you currently need? Do you want your users to be able to retrieve the constrats used for their data analysis ? |
Here's an example from NI-DM for fMRI results. For an overview diagram generated from the turtle file see this figure. Say we want to find the location of all the maps generated from some ContrastEstimation Activity. We could use the following SPARQL query:
Does that help? |
@nicholsn, It definitely helps! another question: do you need to distinguish between contrast types (e.g. profile,difference....)? |
I'll defer to @nicholst. Tom, any thoughts here? |
Just to qualify further my question, would you be running queries such as " get all contrast estimation generated using 'polynomial contrast' or 'helmert constrat' (see http://stat.ethz.ch/R-manual/R-patched/library/stats/html/contrast.html ) . |
Hi, I can't cite other software off-hand, but I learned about the General Maybe we need to distinguish between GLH contrasts and ANOVA contrasts?!! -Tom (Apologies for short msg from my phone) On Wednesday, May 28, 2014, Philippe notifications@github.com wrote:
Thomas Nichols, PhD Web: http://warwick.ac.uk/tenichols |
The last message was sent from a phone; here are the references I wanted to provide:
|
Suggestion: |
@proccaserra: I like your proposal! One minor comment, could we be more precise and use I agree we can keep Example of
|
Since there is ambiguity about what exact a "contrast" is, I do like @cmaumet's suggestion to use |
@cmaumet @nicholst : one last request. I have now added a class in stato (STATO_0000322) with the following label 'contrast weight' (singular). I just want to double check with you that when you use 'contrast weights' (plural), you refer to a 'contrast weight vector' (a set of contrast weights that define a contrast). Finally, as an example of usage, I could import the NI-DM 'contrast map' class to show how things are linked between spatial coordinates and 'contrast' |
@proccaserra: thanks! Yes, that's right: we use 'contrast weights' to refer to a 'contrast weight vector'. However, we decided to avoid the term "vector" because sometimes a matrix of weights is needed (e.g. for F-tests, more discussion at incf-nidash/nidm-specs/issues/36). So, to avoid using a plural maybe 'contrast weight matrix' would be more general? It would be great if you link to |
@proccaserra, |
@nicholst, in fact 'contrast weight' is declared with a synonym: 'contrast coefficient', and it indeed does refer to a single element associated to a specific mean in a contrast vector. As per the definition of 'contrast weight', 'contrast weight vector | matrix' can not be children as both refer would be referring to sets of the parent class. Maybe the one remaining crease is the following: make contrast matrix a parent of 'contrast weight vector' where a vector is defined as a matrix [1,n] ? This granularity level may not be needed unless you'd like to link to specific data structures (Array, lists) in the definitions |
Hi @proccaserra, sorry to revisit this, but the Firstly the use of singular generates grammatical number errors in the definition; I know there are class label rules that cause this, but there must be some way to work around it to get a English-readable definition. Secondly, as mentioned in the discussion that kicked off this issue (#23), contrasts have a more general definition that given in the wikipedia entry. In particular, contrasts don't have to sum to zero and they need not weight "means". In the setting of the General Linear Hypothesis, contrasts are simply weighting parameter estimates. So, presently the definition is
I'd like to propose (changes in bold)
This of course implies that
and wants to be
I'm not sure where the orthogonal bit came from; a pair of contrasts is orthogonal if their inner product is zero, but that's a rather minor point. Also, I've dropped the "c_j" since that isn't explained anywhere (what's c? what's j?). If you're OK with this I'll get @cmaumet's help to make a PR. |
A small suggestion for
|
Thanks for quickly acting on @nicholsn's request for contrast, STATO_0000290. I'm afraid, though, the definition is highly ANOVA-dependent:
More generally, contrasts are used for tests of the General Linear Hypothesis. As detailed in the Encyclopedia of Biostatistics, all that a contrast must satisfy is an estimability constraint (which doesn't necessarily correspond to a sum-to-zero constraint; e.g. consider a contrast used to select out a single regression slope coefficient in a GLM implementing an ANCOVA).
Further, from discussions over at NI-DM we've discovered that contrast has an ambiguous definition. Wikipedia defines 3 meanings (in my words)
Of these, I'd call the last of dubious value (except when doing derivations), but in my experience the term "contrast" is often used ambiguously for the first two.
So! I don't know what the best action is. To exactly mimic usage in the wild, I'd say you need two terms "contrast vector" and "contrast estimate", each of which have "contrast" as a nickname/alias. But I don't know if that's allowed. (For NI-DM, we ended up with "ContrastWeights" and "ContrastMap", basically short for "ContrastEstimateMap", since we always get images/maps of estimates.)
For your consideration, here are definitions of each.
The text was updated successfully, but these errors were encountered: