[gnumeric] fix tooltips on 3e and add some one-median test docs
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] fix tooltips on 3e and add some one-median test docs
- Date: Tue, 31 May 2011 19:49:05 +0000 (UTC)
commit 654c56e6cce15965c443f93e167c25608ed10b22
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Tue May 31 13:41:39 2011 -0600
fix tooltips on 3e and add some one-median test docs
2011-05-31 Andreas J. Guelzow <aguelzow pyrshep ca>
* analysis-statistical.xml: add brief documentation of
sign test and Wilcoxon signed rank test
* figures/analysistools-signtest-ex1.png: new
* figures/analysistools-signtest-ex2.png: new
* figures/analysistools-signtest-ex3.png: new
* figures/analysistools-signtest.png: new
* figures/Makefile.am: add the above image files
2011-05-31 Andreas J. Guelzow <aguelzow pyrshep ca>
* gnumeric-expr-entry.c (gee_check_tooltip): don't show tooltips in
"3e" and similar cases.
2011-05-31 Andreas J. Guelzow <aguelzow pyrshep ca>
* help.h (GNUMERIC_HELP_LINK_SIGN_TEST): use "one-median-tool" since
the dialog is for various tests
doc/C/ChangeLog | 24 +++-
doc/C/analysis-statistical.xml | 201 ++++++++++++++++++++++++--
doc/C/figures/Makefile.am | 4 +
doc/C/figures/analysistools-signtest-ex1.png | Bin 0 -> 18287 bytes
doc/C/figures/analysistools-signtest-ex2.png | Bin 0 -> 16271 bytes
doc/C/figures/analysistools-signtest-ex3.png | Bin 0 -> 19597 bytes
doc/C/figures/analysistools-signtest.png | Bin 0 -> 113864 bytes
src/dialogs/ChangeLog | 5 +
src/dialogs/help.h | 2 +-
src/widgets/ChangeLog | 5 +
src/widgets/gnumeric-expr-entry.c | 7 +-
11 files changed, 223 insertions(+), 25 deletions(-)
---
diff --git a/doc/C/ChangeLog b/doc/C/ChangeLog
index edbfbb7..002f419 100644
--- a/doc/C/ChangeLog
+++ b/doc/C/ChangeLog
@@ -1,14 +1,24 @@
+2011-05-31 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * analysis-statistical.xml: add brief documentation of
+ sign test and Wilcoxon signed rank test
+ * figures/analysistools-signtest-ex1.png: new
+ * figures/analysistools-signtest-ex2.png: new
+ * figures/analysistools-signtest-ex3.png: new
+ * figures/analysistools-signtest.png: new
+ * figures/Makefile.am: add the above image files
+
2011-05-30 Andreas J. Guelzow <aguelzow pyrshep ca>
* analysis-statistical.xml: add brief documentation of
the normality tests tool
- * analysistools-normality-ex1.png: new
- * analysistools-normality-ex2.png: new
- * analysistools-normality-ex3.png: new
- * analysistools-normality-ex4.png: new
- * analysistools-normality-testspec.png: new
- * analysistools-normality.png: new
- * Makefile.am: add the above image files
+ * figures/analysistools-normality-ex1.png: new
+ * figures/analysistools-normality-ex2.png: new
+ * figures/analysistools-normality-ex3.png: new
+ * figures/analysistools-normality-ex4.png: new
+ * figures/analysistools-normality-testspec.png: new
+ * figures/analysistools-normality.png: new
+ * figures/Makefile.am: add the above image files
2011-05-29 Andreas J. Guelzow <aguelzow pyrshep ca>
diff --git a/doc/C/analysis-statistical.xml b/doc/C/analysis-statistical.xml
index e49e4ce..04a3fd0 100644
--- a/doc/C/analysis-statistical.xml
+++ b/doc/C/analysis-statistical.xml
@@ -28,9 +28,9 @@
</para>
<para>All analysis tools also provide a choice whether
- they will enter formulas or just values in the cells. By default
- &gnum; will usually enter formulas. These formulas will automatically
- reevaluate when the data change. For some tools, the formulas also
+ they will enter formulæ or just values in the cells. By default
+ &gnum; will usually enter formulæ. These formulæ will automatically
+ reevaluate when the data change. For some tools, the formulæ also
permit modification of certain parameters.
</para>
@@ -1239,7 +1239,7 @@
</para>
<note><para>
- If you choose to have the tool enter formulas rather than values into the output region,
+ If you choose to have the tool enter formulæ rather than values into the output region,
then you can modify the damping factor α even after you executed the tool.
</para></note>
@@ -1344,7 +1344,7 @@
</para>
<note><para>
- If you choose to have the tool enter formulas rather than values into
+ If you choose to have the tool enter formulæ rather than values into
the output region,
then you can modify the damping factor α and the estimated value
at time 0 after executing the tool.
@@ -1397,7 +1397,7 @@
<para>
<xref linkend="smoothing-example-4" /> shows example output for the exponential smoothing
tool using the formula according to Roberts. Cell A4 contains the estimated level at time 0.
- If you requested to have formulas rather than values entered into the sheet, then changing
+ If you requested to have formulæ rather than values entered into the sheet, then changing
the estimate in A4 and/or the value for α in A2 will result in an immediate change to
the predicted values.
</para>
@@ -1458,7 +1458,7 @@
</figure>
<note><para>
- If you choose to have the tool enter formulas rather than values into
+ If you choose to have the tool enter formulæ rather than values into
the output region,
then you can modify the damping factors α and γ as well as the estimated level and growth rate
at time 0 after executing the tool.
@@ -1498,7 +1498,7 @@
<xref linkend="smoothing-example-5" /> shows example output for Holt's trend corrected
exponential smoothing. Cell A4 contains the estimated level at time 0 and B4 the estimated
growth rate at time 0.
- If you requested to have formulas rather than values entered into the sheet, then changing
+ If you requested to have formulæ rather than values entered into the sheet, then changing
the estimates in A4, B4, the values for α in A2 and/or for γ in B2 will result
in an immediate change to
the predicted values.
@@ -1576,7 +1576,7 @@
</figure>
<note><para>
- If you choose to have the tool enter formulas rather than values into
+ If you choose to have the tool enter formulæ rather than values into
the output region,
then you can modify the damping factors α, γ and δ as well as all
estimates after executing the tool.
@@ -1619,7 +1619,7 @@
additive Holt-Winters method. Cell C7 contains the estimated level at time 0, D7 the
estimated growth rate at time 0, and E4 to E7 the initial seasonal adjustments for each
of the 4 seasons preceding our data time period.
- If you requested to have formulas rather than values entered into the sheet, then changing
+ If you requested to have formulæ rather than values entered into the sheet, then changing
any of these estimates, the values for α in A2, for γ in B2 and/or for δ
in C2 will result in an immediate change to the estimated values.
</para>
@@ -1708,7 +1708,7 @@
</figure>
<note><para>
- If you choose to have the tool enter formulas rather than values into
+ If you choose to have the tool enter formulæ rather than values into
the output region,
then you can modify the damping factors α, γ and δ as well as all
estimates after executing the tool.
@@ -1748,7 +1748,7 @@
multiplicative Holt-Winters method, assuming 4 seasons. Cell C7 contains the estimated level
at time 0, D7 the estimated growth rate at time 0, and E4 to E7 the initial seasonal
adjustments for each of the 4 seasons preceding our data time period.
- If you requested to have formulas rather than values entered into the sheet, then changing
+ If you requested to have formulæ rather than values entered into the sheet, then changing
any of these estimates, the values for α in A2, for γ in B2 and/or for δ
in C2 will result in an immediate change to the estimated values.
</para>
@@ -2666,16 +2666,185 @@
<sect2 id="one-median-tool">
<title>One Median</title>
-
-
+
+ <para>The normalityOne Median test tool provides two non-parametric
+ tests that test the null hypothesis that the sample comes from a
+ population with a given median:</para>
+ <orderedlist>
+ <listitem><para>Sign Test</para></listitem>
+ <listitem><para>Wilcoxon Signed Rank Test</para></listitem>
+ </orderedlist>
+ <para>Selecting the appropriate submenu item opens the dialog with
+ the respective test preselected.</para>
+
<sect3 id="sign-test-tool">
<title>Sign Test</title>
- <para></para>
+ <figure id="one-median-tool-dialog">
+ <title>One-Median Test Dialog</title>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="figures/analysistools-signtest.png"
+ format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>An image of the one-median test dialog used by
+ the Sign Test and the Wilcoxon Signed Rank Test.</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+ </figure>
+ <para>The Sign Test tool performs a one-sample sign test whether
+ the sample comes from a population with a given median.</para>
+ <para>The sample data range is specified via the <quote><guilabel>Input
+ Range:</guilabel></quote> entry
+ (see <xref linkend="one-median-tool-dialog" />). The given range
+ or list of ranges can be grouped into
+ separate data sets by columns, rows, or areas. The tool performs a
+ separate test for each data set.</para>
+ <para>On the <quote><guilabel>Test</guilabel></quote>tab of the dialog
+ (see <xref linkend="one-median-tool-dialog-test-tab" />) the predicted
+ median as well as the significance level are specified.</para>
+ <figure id="one-median-tool-dialog-test-tab">
+ <title>The Test Tab of the One-Median Test Dialog</title>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="figures/analysistools-signtest-ex1.png"
+ format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>An image of the test tab of the one-median test
+ dialog.</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+ </figure>
+
+<example id="usingsigntesttool">
+ <title>Using the Sign Test Tool</title>
+
+ <para>
+ Suppose you want to perform a Sign Test
+ on the data
+ given in <xref linkend="one-median-tool-dialog" /> to determine whether
+ the sample comes from a population of mean 3.</para>
+<orderedlist>
+ <listitem><para>
+ Enter A1:A19 (or Sheet1!$A$1:$A$19) in the
+ <quote><guilabel>Input Range:</guilabel></quote>
+ entry by typing
+ this directly into the entry or clicking in the entry field and
+ then selecting the range on the sheet.</para></listitem>
+ <listitem><para> Select the <quote><guibutton>Labels</guibutton></quote>
+ option since the first row contains a label. (see
+ <xref linkend="one-median-tool-dialog" />).</para></listitem>
+ <listitem><para> On the <quote><guibutton>Test</guibutton></quote> tab
+ of the dialog
+ (see <xref linkend="one-median-tool-dialog-test-tab" />) select the
+ Sign Test.</para></listitem>
+ <listitem><para> Specify an appropriate significance level
+ Alpha, say 0.05.</para></listitem>
+ <listitem><para> Select thepecify the median of the null hypothesis (3)
+ in the <quote><guibutton>Predicted Median</guibutton></quote> entry.
+ </para></listitem>
+ <listitem><para> Specify the output
+ options as described above.</para></listitem>
+ <listitem><para> Press the OK button. </para></listitem>
+</orderedlist>
+ <para> The output of this sign test is shown in
+ <xref linkend="sign-test-dialog-output" />.</para>
+ </example>
+
+ <figure id="sign-test-dialog-output">
+ <title>Output of a Sign Test</title>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="figures/analysistools-signtest-ex2.png"
+ format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>An image of the output of a Sign Test.</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+ </figure>
</sect3>
<sect3 id="wilcoxon-sign-test-tool">
<title>Wilcoxon Signed Rank Test</title>
- <para></para>
+ <para>The Wilcoxon Signed Rank TTest tool performs a one-sample
+ sign test whether
+ the sample comes from a population with a given median.</para>
+ <para>The sample data range is specified via the <quote><guilabel>Input
+ Range:</guilabel></quote> entry
+ (see <xref linkend="one-median-tool-dialog" />). The given range
+ or list of ranges can be grouped into
+ separate data sets by columns, rows, or areas. The tool performs a
+ separate test for each data set.</para>
+ <para>On the <quote><guilabel>Test</guilabel></quote>tab of the dialog
+ (see <xref linkend="one-median-tool-dialog-test-tab" />) the predicted
+ median as well as the significance level are specified.</para>
+
+ <note>
+ <para>
+ The p-values given by this tool are determined using a normal
+ approximation. This approximation is only valid if the sample
+ size is at least 12.
+ </para>
+ </note>
+
+<example id="usingwilcoxonsignedranktesttool">
+ <title>Using the Wilcoxon Signed Rank Test Tool</title>
+ <para>
+ Suppose you want to perform a Wilcoxon Signed Rank Test
+ on the data
+ given in <xref linkend="one-median-tool-dialog" /> to determine whether
+ the sample comes from a population of mean 3.</para>
+<orderedlist>
+ <listitem><para>
+ Enter A1:A19 (or Sheet1!$A$1:$A$19) in the
+ <quote><guilabel>Input Range:</guilabel></quote>
+ entry by typing
+ this directly into the entry or clicking in the entry field and
+ then selecting the range on the sheet.</para></listitem>
+ <listitem><para> Select the <quote><guibutton>Labels</guibutton></quote>
+ option since the first row contains a label. (see
+ <xref linkend="one-median-tool-dialog" />).</para></listitem>
+ <listitem><para> On the <quote><guibutton>Test</guibutton></quote> tab
+ of the dialog
+ (see <xref linkend="one-median-tool-dialog-test-tab" />) select the
+ Wilcoxon Signed Rank Test.</para></listitem>
+ <listitem><para> Specify an appropriate significance level
+ Alpha, say 0.05.</para></listitem>
+ <listitem><para> Select thepecify the median of the null hypothesis (3)
+ in the <quote><guibutton>Predicted Median</guibutton></quote> entry.
+ </para></listitem>
+ <listitem><para> Specify the output
+ options as described above.</para></listitem>
+ <listitem><para> Press the OK button. </para></listitem>
+</orderedlist>
+ <para> The output of this sign test is shown in
+ <xref linkend="wilcoxon-sign-test-dialog-output" />.</para>
+ </example>
+
+
+ <figure id="wilcoxon-sign-test-dialog-output">
+ <title>Output of a Wilcoxon Signed Rank Test</title>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="figures/analysistools-signtest-ex3.png"
+ format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>An image of the output of a Wilcoxon Signed Rank
+ Test.</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+ </figure>
</sect3>
</sect2>
diff --git a/doc/C/figures/Makefile.am b/doc/C/figures/Makefile.am
index e250b4c..a4305b4 100644
--- a/doc/C/figures/Makefile.am
+++ b/doc/C/figures/Makefile.am
@@ -83,6 +83,10 @@ EXTRA_DIST = \
analysistools-regression-ex2.png \
analysistools-regression-ex3.png \
analysistools-regression.png \
+ analysistools-signtest-ex1.png \
+ analysistools-signtest-ex2.png \
+ analysistools-signtest-ex3.png \
+ analysistools-signtest.png \
analysistools-sampling-ex1.png \
analysistools-sampling-ex2.png \
analysistools-sampling.png \
diff --git a/doc/C/figures/analysistools-signtest-ex1.png b/doc/C/figures/analysistools-signtest-ex1.png
new file mode 100644
index 0000000..453a654
Binary files /dev/null and b/doc/C/figures/analysistools-signtest-ex1.png differ
diff --git a/doc/C/figures/analysistools-signtest-ex2.png b/doc/C/figures/analysistools-signtest-ex2.png
new file mode 100644
index 0000000..cb2bb87
Binary files /dev/null and b/doc/C/figures/analysistools-signtest-ex2.png differ
diff --git a/doc/C/figures/analysistools-signtest-ex3.png b/doc/C/figures/analysistools-signtest-ex3.png
new file mode 100644
index 0000000..0f1cac8
Binary files /dev/null and b/doc/C/figures/analysistools-signtest-ex3.png differ
diff --git a/doc/C/figures/analysistools-signtest.png b/doc/C/figures/analysistools-signtest.png
new file mode 100644
index 0000000..8dba4f0
Binary files /dev/null and b/doc/C/figures/analysistools-signtest.png differ
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 9c0d907..39e596e 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-31 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * help.h (GNUMERIC_HELP_LINK_SIGN_TEST): use "one-median-tool" since
+ the dialog is for various tests
+
2011-05-26 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-analysis-tools.c (tool_load_selection): select the entered
diff --git a/src/dialogs/help.h b/src/dialogs/help.h
index 06f5845..2e9b9ae 100644
--- a/src/dialogs/help.h
+++ b/src/dialogs/help.h
@@ -162,7 +162,7 @@
#define GNUMERIC_HELP_LINK_NORMALITY "normality-tool"
/* dialog-analysis-tool-sign-test.c */
-#define GNUMERIC_HELP_LINK_SIGN_TEST "sign-test-tool"
+#define GNUMERIC_HELP_LINK_SIGN_TEST "one-median-tool"
/* dialog-analysis-tool-wilcoxon-mann-whitney.c */
#define GNUMERIC_HELP_LINK_WILCOXON_MANN_WHITNEY "wilcoxon-mann-whitney-tool"
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index 9d23ca7..6e8965f 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-31 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * gnumeric-expr-entry.c (gee_check_tooltip): don't show tooltips in
+ "3e" and similar cases.
+
2011-05-31 Morten Welinder <terra gnome org>
* gnumeric-expr-entry.c (gnm_expr_entry_parse): Always try value
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index 680c92f..0e01b73 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -970,6 +970,7 @@ gee_check_tooltip (GnmExprEntry *gee)
char *str;
gboolean stuff = FALSE, completion_se_set = FALSE;
GnmLexerItem *gli, *gli_c;
+ int last_token = 0;
if (gee->lexer_items == NULL || !gee->tooltip.enabled ||
(!gee->tooltip.is_expr && !gee->is_cell_renderer)) {
@@ -1010,13 +1011,17 @@ gee_check_tooltip (GnmExprEntry *gee)
}
if (gli > gli_c)
gli--;
+ if (gli > gli_c)
+ last_token = (gli - 1)->token;
/* This creates the completion tooltip */
- if (!stuff && gli->token == STRING) {
+ if (!stuff && gli->token == STRING && last_token != CONSTANT) {
guint start_t = gli->start;
char *prefix;
GSList *list;
+ g_print ("last token: %i\n", last_token);
+
end_t = gli->end;
prefix = g_strndup (str + start_t, end_t - start_t);
list = gnm_func_lookup_prefix
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]