[
Intro
|
Usage
|
Sample
|
Mathematics
|
Software
|
Installation
|
Known problems
]
Models
The following regression models are supported:
|
![]() |
regressions.rpn sums up the expressions
x, x**2, y, y**2, x y, 1, ln x, (ln x)**2, y ln x, ln y,
(ln y)**2, x lny, lnx lny.
If any of the logarithmic models can't be supported due to negative
values, then it will be disabled (correlation returns zero in this
case).
The user can also manually disable the logarithmic models.
Functions
[+] | Sum up the expressions needed for the regression calculations. Returns the new n. |
[-] | Subtract expressions.
This lets you correct entries made with [+] .
Returns the new n. |
clr | Clear sums. |
sum | Calculate sums. Returns sum(x), sum(y) |
mean | Calculate mean values. Returns mean(x), mean(y) |
wm | Calculate the weighted mean. Returns wmean(x) where the yi are the weights. |
sdev | Calculate standard deviations. Returns sdev(x), sdev(y). Requires at least two sets of values. |
Model | Regression model chose dialog:
best lin log exp pwr .
best calculates all possible regression models and choses
the one with the highest correlation-square.
Returns the index of the chosen model. |
x | Calculate xf (forecast) from y. |
y | Calculate yf (forecast) from x. |
a | Slope parameter. Zero if the chosen model is illegal (because of negative values). |
b | Offset parameter. |
r | Correlation. Between -1 and 1. Values far from zero are better. |
To calculate statistics and regressions on the following data sets, enter:
|
clr
11 Enter 2 [+] 13 Enter 3 [+] 17 Enter 5 [+] 19 Enter 7 [+] |
Statistics results:
function | tab | result(s) |
sum | sum | 17.0000 60.0000 |
mean | mean | 4.2500 15.0000 |
weighted mean | wm | 4.6500 |
standard deviation | sdev | 2.2174 3.6515 |
Regressions results:
model | a | b | r | yf(11) | xf(23) |
lin | 1.6271 | 8.0847 | 0.9881 | 25.9831 | 9.1667 |
log | 6.5833 | 6.1996 | 0.9964 | 21.9856 | 12.8325 |
exp | 0.1099 | 9.1903 | 0.9781 | 30.7775 | 8.3489 |
pwr (best) | 0.4494 | 8.0395 | 0.9972 | 23.6178 | 10.3699 |
The regression parameters a and b are optimized for least
squares.
The two partial differentials produce a system of equations from which
a and b can be calculated.
The correlation can be calculated from variances and covariance. See any good math textbook for more information. |
![]() |
source:
regressions.rpn
source stripped of comments and blanks, to fit into Palm's clipboard:
regressions-s.rpn
Installation
best
model is chosen.
This is not a bug since with two value pairs, all four models achieve
the same correlation 1.
Please send your bug reports, if you have any.
links: Palm Computing (palmsource, emulator) [formerly at 3Com (Palm)] [formerly at USR (Palm)] , RPN (software, documentation, archive, coweb) [formerly at Cornell]
Back to the Palm RPN page