stats/
boxcox.pro
Routines
result = get_w(lambda)compute the "w" parameter for boxcox (utility routine)
result = boxcox(x, y [, double=double] [, PLOT=PLOT] [, RANGE=RANGE] [, SUBTITLE=SUBTITLE])determine the Cox transformation that makes the data most normal from Applied linear statistical models Neter, Kutner, et al.
Routine details
topget_w
result = get_w(lambda)
compute the "w" parameter for boxcox (utility routine)
Return value
the w parameter from boxcox
Parameters
- lambda in required
lambda parameter from boxcox
Statistics
| Lines: | 14 |
| McCabe complexity: |
topboxcox
Stats
result = boxcox(x, y [, double=double] [, PLOT=PLOT] [, RANGE=RANGE] [, SUBTITLE=SUBTITLE])
determine the Cox transformation that makes the data most normal from Applied linear statistical models Neter, Kutner, et al. pp 133
BOXCOX: contains the data passed in to then make it availiable to the utility routine get_w
all the Y values must be positive and non-zero
Return value
structure containing: 'minsse' - the minimum sse 'lambda' - the Cox transformation where that is true
Parameters
- x in required
the 'x' values
- y in required
the 'y' values (must be the same length as x)
Keywords
- double in optional
do the calculation in double precision
- PLOT in optional
plot a diagnostic plot
- RANGE in optional
the range of Cox transformations to search for the answer, default [-2,2]
- SUBTITLE in optional
set the subtitle for the diagnostic plot
Examples
x=findgen(10)
y=randomn(seed, 10)
y-=min(y)-0.1
ans = boxcox(x, y)
help, ans, /str
** Structure <1eaa814>, 2 tags, length=8, data length=8, refs=1:
MINSSE FLOAT 4.78825
LAMBDA FLOAT Array[1]
print, ans.lambda
0.700000
Author information
- History:
Tue Jan 22 14:11:45 2008, Brian Larsen documented and fixed up
Statistics
| Lines: | 31 |
| McCabe complexity: |
File attributes
| Modifcation date: | Mon Sep 22 12:40:38 2008 |
| Lines: | 127 |
![[attach.png]](../idldoc-resources/attach.png)