Port goffice's general_linear_regression on top of the quad-precision QR machinery: per-variable radix-power column scaling, degenerate dimension marking against the R-eigenvalue range, quad back-solving of the scaled system, and the quad residual sum of squares that drives the near-singular detection. Build LINEST/LOGEST (coefficients via the affine constant column like go_linear_regression, log-transformed ys and exponentiated results for LOGEST), TREND (vertical/horizontal/ rectangular known-xs layouts with gnumeric's prediction formula and shape errors), and GROWTH (exponential fit with new-x predictions) on that core, surfacing the array's top-left element in scalar cells exactly like gnumeric's display. Omitted function arguments now evaluate to empty values instead of errors, matching gnumeric's argument semantics; regression functions report #REF! for empty known-xs arguments like gnumeric's shape mismatch. New regression_functions fixture with 15 formula rows; 18 fixtures now 1:1 with ssconvert including round-trips.
27 lines
2.7 KiB
XML
27 lines
2.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<gnm:Workbook xmlns:gnm="http://www.gnumeric.org/v10.dtd">
|
|
<gnm:SheetNameIndex><gnm:SheetName gnm:Cols="8" gnm:Rows="20">Sheet1</gnm:SheetName></gnm:SheetNameIndex>
|
|
<gnm:Sheets><gnm:Sheet><gnm:Name>Sheet1</gnm:Name><gnm:MaxCol>7</gnm:MaxCol><gnm:MaxRow>19</gnm:MaxRow><gnm:Cells>
|
|
<gnm:Cell Row="0" Col="0" ValueType="30">1</gnm:Cell><gnm:Cell Row="1" Col="0" ValueType="30">2</gnm:Cell><gnm:Cell Row="2" Col="0" ValueType="30">3</gnm:Cell><gnm:Cell Row="3" Col="0" ValueType="30">4</gnm:Cell><gnm:Cell Row="4" Col="0" ValueType="30">5</gnm:Cell>
|
|
<gnm:Cell Row="0" Col="1" ValueType="30">2</gnm:Cell><gnm:Cell Row="1" Col="1" ValueType="30">4.1</gnm:Cell><gnm:Cell Row="2" Col="1" ValueType="30">5.9</gnm:Cell><gnm:Cell Row="3" Col="1" ValueType="30">8.2</gnm:Cell><gnm:Cell Row="4" Col="1" ValueType="30">9.8</gnm:Cell>
|
|
<gnm:Cell Row="0" Col="2" ValueType="30">1.5</gnm:Cell><gnm:Cell Row="1" Col="2" ValueType="30">3.2</gnm:Cell><gnm:Cell Row="2" Col="2" ValueType="30">4.6</gnm:Cell><gnm:Cell Row="3" Col="2" ValueType="30">6.4</gnm:Cell><gnm:Cell Row="4" Col="2" ValueType="30">8.1</gnm:Cell>
|
|
<gnm:Cell Row="0" Col="3" ValueType="30">10.5</gnm:Cell><gnm:Cell Row="1" Col="3" ValueType="30">22.3</gnm:Cell><gnm:Cell Row="2" Col="3" ValueType="30">31.7</gnm:Cell><gnm:Cell Row="3" Col="3" ValueType="30">44.1</gnm:Cell><gnm:Cell Row="4" Col="3" ValueType="30">52.9</gnm:Cell>
|
|
<gnm:Cell Row="0" Col="4" ValueType="30">1.2</gnm:Cell><gnm:Cell Row="1" Col="4" ValueType="30">2.5</gnm:Cell><gnm:Cell Row="2" Col="4" ValueType="30">4.1</gnm:Cell><gnm:Cell Row="3" Col="4" ValueType="30">7.6</gnm:Cell><gnm:Cell Row="4" Col="4" ValueType="30">15.4</gnm:Cell>
|
|
<gnm:Cell Row="5" Col="0" ValueType="30">6</gnm:Cell><gnm:Cell Row="5" Col="1" ValueType="30">7</gnm:Cell><gnm:Cell Row="5" Col="2" ValueType="30">2</gnm:Cell><gnm:Cell Row="0" Col="6">=LINEST(B1:B5,A1:A5)</gnm:Cell>
|
|
<gnm:Cell Row="1" Col="6">=LINEST(B1:B5)</gnm:Cell>
|
|
<gnm:Cell Row="2" Col="6">=LINEST(B1:B5,,FALSE)</gnm:Cell>
|
|
<gnm:Cell Row="3" Col="6">=LINEST(D1:D5,A1:C5)</gnm:Cell>
|
|
<gnm:Cell Row="4" Col="6">=LINEST(B1:B5,A1:B5)</gnm:Cell>
|
|
<gnm:Cell Row="5" Col="6">=TREND(B1:B5,A1:A5,6)</gnm:Cell>
|
|
<gnm:Cell Row="6" Col="6">=TREND(B1:B5)</gnm:Cell>
|
|
<gnm:Cell Row="7" Col="6">=TREND(B1:B5,A1:A5)</gnm:Cell>
|
|
<gnm:Cell Row="8" Col="6">=TREND(B1:B5,A1:A5,6,FALSE)</gnm:Cell>
|
|
<gnm:Cell Row="9" Col="6">=TREND(D1:D5,A1:C5,A6:C6)</gnm:Cell>
|
|
<gnm:Cell Row="10" Col="6">=GROWTH(E1:E5,A1:A5,6)</gnm:Cell>
|
|
<gnm:Cell Row="11" Col="6">=GROWTH(E1:E5)</gnm:Cell>
|
|
<gnm:Cell Row="12" Col="6">=LOGEST(E1:E5,A1:A5)</gnm:Cell>
|
|
<gnm:Cell Row="13" Col="6">=LOGEST(E1:E5)</gnm:Cell>
|
|
<gnm:Cell Row="14" Col="6">=GROWTH(E1:E5,A1:A5,2)</gnm:Cell>
|
|
</gnm:Cells></gnm:Sheet></gnm:Sheets>
|
|
</gnm:Workbook>
|