|
|
Line 1: |
Line 1: |
− | == Customize Keyboard ==
| |
− | You need an editor, which preserves Unix line ends and the coding "UTF-8", and which will not set a byte order mark. I have used "PSPAD" or "jEdit" on WinXP. On WinXP neither WordPad nor NotePad is suitable.
| |
− |
| |
− | On WinXP the keybord settings for the modules are in the files
| |
− | <pre><..>\user\config\soffice.cfg\modules\<module name>\accelerator\<language code>\current.xml</pre>
| |
− | and the general settings are in the file
| |
− | <pre><..>\user\config\soffice.cfg\global\accelerator\<language code>\current.xml</pre>
| |
− |
| |
− | Older versions of OOo might not have this files by default. If they are missing, goto Tool | Customize | Keyboard and change something. Then the files will be generated.
| |
− |
| |
− | # Close OOo and close quickstarter.
| |
− | # Make a copy of the file, you will work on.
| |
− | # Open the file in an editor.
| |
− | # Edit the file and save it.
| |
− | # Start OOo.
| |
− |
| |
− | If something is wrong, OOo will crash. Do not sent a crash report, it is your fault, not the fault of OOo. But restore the original file with the copy you have made in step 2.
| |
− |
| |
− | To learn more about this file, see "StarOffice 7 Administration Guide" chapter 4 [http://docs-pdf.sun.com/817-1820/817-1820.pdf], "StarOFfice 8 Administration Guide" chapter 3 and appendix A [http://dlc.sun.com/pdf/817-7496/817-7496.pdf], and "OpenOffice.org XML File Format 1.0 Technical Reference Manual", chapter 9.2 [http://xml.openoffice.org/xml_specification.pdf].
| |
− |
| |
− | Let us have a deeper look at the file. You will see something like
| |
− | <pre><?xml version="1.0" encoding="UTF-8"?>
| |
− | <accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
| |
− | <accel:item accel:code="KEY_Q" accel:mod1="true" xlink:href=".uno:Quit"/>
| |
− | <accel:item accel:code="KEY_N" accel:shift="true" accel:mod1="true" xlink:href=".uno:NewDoc"/></pre>
| |
− |
| |
− | You will notice that the lines have all the same structure.
| |
− |
| |
− | <pre>accel:item</pre> A single short cut key will be defined.
| |
− | <pre>accel:code="KEY_Q"</pre>
| |
− | You can use only keys which has got a name. I don't know where to find a list of '''all''' possible keys and which of them will work, dependent on keyboard, operating system and language.
| |
− |
| |
− | Next the modifier keys are listed. You need only those, which are used, because the default value of the modifier keys is "false".
| |
− | <pre>accel:mod1="true"</pre> That is the CRTL-key
| |
− | <pre>accel:mod2="true"</pre> That is the ALT-key
| |
− | <pre>accel:shift="true"</pre> That is the SHIFT-key
| |
− | Instead of pressing the keys CRTL and Alt together, you can also press the key AltGr (That's on a German keyboard. Would be nice, if some correct this for an English keyboard).
| |
− |
| |
− | The last position decribes what the shortcut should do, for example
| |
− | <pre>xlink:href=".uno:Quit"</pre> will close OOo.
| |
− |
| |
− | Inside the quotes stands a Command URL. In older OOo versions the command URL could be build as <pre>"slot:<number>"</pre> but that way should not be used for newer versions, if a ".uno" form exists.
| |
− | You find those commands in the document [http://framework.openoffice.org/files/documents/25/2570/commandsReference.html] in the first column or in the above mentioned document "StarOFfice 8 Administration Guide".
| |
− |
| |
− | Some of the commands need parameters. I don't know a list of those parameters, but you can get a hint, if you record a macro and look, which parameters the dispatcher gets. For example the record of inserting a special character gives you the Command URL ".uno:InsertSymbol" and the parameter "Symbols" with for example the value "δ" (Greek delta). Or look at the existing lines in the configuration files. Perhaps you can alter a parameter?
| |
− |
| |
− | Such parameters follow the command after a ?. For inserting the character "δ" the complete Command URL is ".uno:InsertSymbol?Symbols:string=δ".
| |
− |
| |
− | Modifier keys and command URL may be exchanged.
| |
− |
| |
− | The complete line for inserting the special character δ when pressing the keys AltGr (German) and D together is then
| |
− | <pre><accel:item accel:code="KEY_D" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertSymbol?Symbols:string=δ" /></pre>
| |
− |
| |
| == CHISQINV == | | == CHISQINV == |
| Calculates the inverse of the CHISQDIST function. | | Calculates the inverse of the CHISQDIST function. |
Line 136: |
Line 83: |
| === Issues: === | | === Issues: === |
| This function is expected for OOo3.1. | | This function is expected for OOo3.1. |
− |
| |
− |
| |
− | == BETADIST ==
| |
− | Calculates the cumulative distribution function or the probability density function of a beta distribution.
| |
− |
| |
− | === Syntax ===
| |
− | <tt>'''BETADIST(x; α; β; a; b; cumulative)'''</tt>
| |
− |
| |
− | The beta distribution is a family of continuous probability distributions, where <tt>'''α'''</tt> and <tt>'''β'''</tt> are parameters controlling the shape of the distribution.
| |
− |
| |
− | The parameters <tt>'''a'''</tt> and <tt>'''b'''</tt> are lower and upper bounds of the distribution. You can interpret the value a as ''location'' and the value b−a as ''scale''.
| |
− |
| |
− | <tt>'''a'''</tt> and <tt>'''b'''</tt> are optional parameters which default (if omitted) to <tt>'''0'''</tt> and <tt>'''1'''</tt>.
| |
− |
| |
− | <tt>'''cumulative'''</tt> is an optional parameter which defaults to TRUE() if omitted.
| |
− |
| |
− | Before OOo version 3.1 the parameter ''cumulative'' doesn't exists and only the cumulative probability function is calculated.
| |
− |
| |
− | Constraints:
| |
− | # α > 0 , β > 0 , a < b
| |
− | # If α < 1, than the density function has a pole at x = a.
| |
− | # If β < 1, than the density function has a pole at x = b.
| |
− |
| |
− | === Semantic ===
| |
− |
| |
− | For <tt>'''cumulative = FALSE()'''</tt> the function BETADIST calculates the probability density function (besides the constraints given above):
| |
− | :<math>f(x)=
| |
− | \begin{cases}
| |
− | 0, & \textrm{if}\; x < a \or x > b \\
| |
− | \displaystyle \frac {\Gamma(\alpha + \beta)} {\Gamma(\alpha) \Gamma(\beta)} \cdot \left( \frac {x-a} {b-a} \right)^{\alpha-1}\cdot \left(1- \frac{x-a}{b-a} \right)^{\beta-1} \cdot \frac{1}{b-a}, & \textrm{if}\; a \le x \le b
| |
− | \end{cases}
| |
− | </math>
| |
− |
| |
− | For <tt>'''cumulative = TRUE()'''</tt> the function BETADIST calculates the cumulative distribution function:
| |
− | :<math>F(x)=
| |
− | \begin{cases}
| |
− | 0, & \textrm{if}\; x<a \\
| |
− | 1, & \textrm{if}\; x>b \\
| |
− | \displaystyle \int_a^x \frac {\Gamma(\alpha + \beta)} {\Gamma(\alpha) \Gamma(\beta)} \cdot \left( \frac {x-a} {b-a} \right)^{\alpha-1}\cdot \left(1- \frac{x-a}{b-a} \right)^{\beta-1} \mathrm{dt}, & \textrm{if}\; a \le x \le b
| |
− | \end{cases}
| |
− | </math>
| |
− |
| |
− | Notice, that
| |
− | :<math>\displaystyle F(x)=I_z(\alpha,\beta)</math>
| |
− | where
| |
− | :<math>\displaystyle z = \frac {x-a}{b-a}</math>
| |
− | and <math>\scriptstyle I_z</math> is the regularized incomplete beta function.
| |
− |
| |
− | === Example ===
| |
− | [[Image:BetaDistributionDensityLocationScale.png|Graphs of Beta distribution density functions using parameter a and b]]
| |
− |
| |
− | <tt>'''BETADIST(1;5;3;-2;4;FALSE())</tt>
| |
− | : returns approximately 0.273
| |
− |
| |
− | [[Image:BetaDistributionDensityNormal.png|Graphs of Beta distribution density functions with borders 0 and 1]]
| |
− |
| |
− | <tt>'''BETADIST(0.2;0.7;4;0;1;FALSE())</tt>
| |
− | : returns approximately 1.644
| |
− |
| |
− | [[Image:BetaDistributionDensitySpecial.png|Graphs of Beta distribution density functions with alpha=1]]
| |
− |
| |
− | <tt>'''BETADIST(1;1;0.5;0;1;FALSE())</tt>
| |
− | : returns ''illegal argument'' because there is a pole
| |
− |
| |
− | <tt>'''BETADIST(1.1;1;0.5;0;1;FALSE())</tt>
| |
− | : returns 0
| |
− |
| |
− | === See also: ===
| |
− | [[Documentation/How_Tos/Calc: BETAINV function|'''BETAINV''']]
| |
− |
| |
− | [[Documentation/How_Tos/Calc: Statistical functions|'''Statistical functions''']]
| |
− |
| |
− | [[Documentation/How_Tos/Calc: Functions listed alphabetically|'''Functions listed alphabetically''']],
| |
− | [[Documentation/How_Tos/Calc: Functions listed by category|'''Functions listed by category''']]
| |
− |
| |
− |
| |
| | | |
| == Accuracy == | | == Accuracy == |
Calculates the inverse of the CHISQDIST function.
.
Returns the values of the Gamma function.
For x < 0.5 Eulers reflection formula is used.
The Gamma function has poles for negative integers and for zero. Near the poles the values are less accurate.
But be aware, that OpenOffice.org has only a precision of 15 digits, therefore the results for x > 21 are rounded.
This function is expected for OOo3.1.
Calc uses for its calculation floating point numbers in double precision as defined in IEEE 754 standard. You get the best representation in a spreadsheet cell using the scientific format with format code 0.00000000000000E+000. But because a binary format is used internally, the numbers in calculation might differ slightly from the shown decimal values. Only integers in the range can be represented exactly in the internal format.
Although you can force Calc to show 15 decimal digits, these might not be all accurate. This article lists some of the problems.
If you subtract two non integer numbers, which have nearly the same value, the result has less significant digits then the initial values.
Most non integer numbers have infinite decimal places in binary format, which has to be rounded somewhere. Calculating with this rounded values and converting back to decimal format gives different values then calculating manually in decimal format.