Getting Summary Statistics Values for Workbook Series

Below is the example of using the GetWbkMd operation to get values of summary statistics for all workbook series. The request contains an instance of opened workbook and parameters for getting statistics values.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetWbkMd xmlns="http://www.fsight.ru/PP.SOM.Som">
<tWbk xmlns="">
  <id>S1!M!S!W3</id>
  </tWbk>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <useGridAutoAdjust>true</useGridAutoAdjust>
  <lanerStatistics />
  </pattern>
  </tArg>
  </GetWbkMd>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetWbkMdResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xmlns="">
  <id>S1!M!S!W3</id>
  </id>
<meta xmlns="">
<obInst>
<obDesc ds="" isShortcut="0" isLink="0" ver="2" hf="0">
  <i>WBK_AD</i>
  <n>Annual data</n>
  <k>5505</k>
  <c>2827</c>
  <p>5471</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </obInst>
  <dirty>0</dirty>
  <windowsPosition>Vertical</windowsPosition>
  <hasPivot>0</hasPivot>
  <hasLaner>1</hasLaner>
<series count="3">
  <its />
  </series>
<lanerStatistics>
<its>
<it>
  <k>0</k>
  <id>Number of observations</id>
  <n>Number of observations</n>
  <vis>1</vis>
  <type>ObsCount</type>
  <value />
<group>
  <k>1</k>
  <id>General</id>
  </group>
  </it>
<it>
  <k>1</k>
  <id>Determination coefficient (R^2)</id>
  <n>Determination coefficient (R^2)</n>
  <vis>1</vis>
  <type>R2</type>
  <value />
<group>
  <k>2</k>
  <id>Performance criteria</id>
  </group>
  </it>
<it>
  <k>2</k>
  <id>Adjusted determination coefficient (adj R^2)</id>
  <n>Adjusted determination coefficient (adj R^2)</n>
  <vis>1</vis>
  <type>AdjR2</type>
  <value />
<group>
  <k>2</k>
  <id>Performance criteria</id>
  </group>
  </it>
<it>
  <k>3</k>
  <id>Fisher statistic (F)</id>
  <n>Fisher statistic (F)</n>
  <vis>1</vis>
  <type>Fstat</type>
  <value />
<group>
  <k>2</k>
  <id>Performance criteria</id>
  </group>
  </it>
<it>
  <k>4</k>
  <id>Fisher statistic probability (p-v)</id>
  <n>Fisher statistic probability (p-v)</n>
  <vis>1</vis>
  <type>ProbFstat</type>
  <value />
<group>
  <k>2</k>
  <id>Performance criteria</id>
  </group>
  </it>
<it>
  <k>5</k>
  <id>Log-likelihood function (LogL)</id>
  <n>Log-likelihood function (LogL)</n>
  <vis>1</vis>
  <type>LogL</type>
  <value />
<group>
  <k>2</k>
  <id>Performance criteria</id>
  </group>
  </it>
<it>
  <k>6</k>
  <id>Akaike information criterion (AIC)</id>
  <n>Akaike information criterion (AIC)</n>
  <vis>1</vis>
  <type>AIC</type>
  <value />
<group>
  <k>2</k>
  <id>Performance criteria</id>
  </group>
  </it>
<it>
  <k>7</k>
  <id>Schwarz information criterion (SC)</id>
  <n>Schwarz information criterion (SC)</n>
  <vis>1</vis>
  <type>SC</type>
  <value />
<group>
  <k>2</k>
  <id>Performance criteria</id>
  </group>
  </it>
<it>
  <k>8</k>
  <id>Standard error (SE)</id>
  <n>Standard error (SE)</n>
  <vis>1</vis>
  <type>SE</type>
  <value />
<group>
  <k>2</k>
  <id>Performance criteria</id>
  </group>
  </it>
<it>
  <k>9</k>
  <id>Durbin–Watson statistic (DW)</id>
  <n>Durbin–Watson statistic (DW)</n>
  <vis>1</vis>
  <type>DW</type>
  <value />
<group>
  <k>3</k>
  <id>Diagnostic criteria</id>
  </group>
  </it>
<it>
  <k>10</k>
  <id>Lower limit probability</id>
  <n>Lower limit probability</n>
  <vis>1</vis>
  <type>DWLowerBound</type>
  <value />
<group>
  <k>3</k>
  <id>Diagnostic criteria</id>
  </group>
  </it>
<it>
  <k>11</k>
  <id>Upper limit probability</id>
  <n>Upper limit probability</n>
  <vis>1</vis>
  <type>DWUpperBound</type>
  <value />
<group>
  <k>3</k>
  <id>Diagnostic criteria</id>
  </group>
  </it>
<it>
  <k>12</k>
  <id>Mean error</id>
  <n>Mean error</n>
  <vis>1</vis>
  <type>ME</type>
  <value />
<group>
  <k>4</k>
  <id>Residual analysis</id>
  </group>
  </it>
<it>
  <k>13</k>
  <id>Mean absolute error</id>
  <n>Mean absolute error</n>
  <vis>1</vis>
  <type>MAE</type>
  <value />
<group>
  <k>4</k>
  <id>Residual analysis</id>
  </group>
  </it>
<it>
  <k>14</k>
  <id>Mean squared error</id>
  <n>Mean squared error</n>
  <vis>1</vis>
  <type>MSE</type>
  <value />
<group>
  <k>4</k>
  <id>Residual analysis</id>
  </group>
  </it>
<it>
  <k>15</k>
  <id>Root mean squared error</id>
  <n>Root mean squared error</n>
  <vis>1</vis>
  <type>SqMSE</type>
  <value />
<group>
  <k>4</k>
  <id>Residual analysis</id>
  </group>
  </it>
<it>
  <k>16</k>
  <id>Residual variance</id>
  <n>Residual variance</n>
  <vis>1</vis>
  <type>VE</type>
  <value />
<group>
  <k>4</k>
  <id>Residual analysis</id>
  </group>
  </it>
<it>
  <k>17</k>
  <id>Standard deviation of residuals</id>
  <n>Standard deviation of residuals</n>
  <vis>1</vis>
  <type>SEE</type>
  <value />
<group>
  <k>4</k>
  <id>Residual analysis</id>
  </group>
  </it>
<it>
  <k>18</k>
  <id>Minimum</id>
  <n>Minimum</n>
  <vis>1</vis>
  <type>Min</type>
  <value>0.61346821</value>
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>19</k>
  <id>Maximum</id>
  <n>Maximum</n>
  <vis>1</vis>
  <type>Max</type>
  <value>1.68005197</value>
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>20</k>
  <id>Average</id>
  <n>Average</n>
  <vis>1</vis>
  <type>Average</type>
  <value>1.139227082222222</value>
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>21</k>
  <id>Median</id>
  <n>Median</n>
  <vis>1</vis>
  <type>Median</type>
  <value>1.14567254</value>
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>22</k>
  <id>Mode</id>
  <n>Mode</n>
  <vis>1</vis>
  <type>Mode</type>
  <value>0.69913685</value>
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>23</k>
  <id>Standard deviation</id>
  <n>Standard deviation</n>
  <vis>1</vis>
  <type>StDev</type>
  <value>0.3502606231582123</value>
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>24</k>
  <id>Variance</id>
  <n>Variance</n>
  <vis>1</vis>
  <type>Dispersion</type>
  <value>0.1226825041351792</value>
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>25</k>
  <id>Start date</id>
  <n>Start date</n>
  <vis>1</vis>
  <type>StartDate</type>
  <value />
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>26</k>
  <id>End date</id>
  <n>End date</n>
  <vis>1</vis>
  <type>EndDate</type>
  <value />
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>27</k>
  <id>Earliest start date</id>
  <n>Earliest start date</n>
  <vis>1</vis>
  <type>FStartDate</type>
  <value>1995-01-01</value>
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>28</k>
  <id>Latest start date</id>
  <n>Latest start date</n>
  <vis>1</vis>
  <type>LStartDate</type>
  <value>1995-01-01</value>
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>29</k>
  <id>Earliest end date</id>
  <n>Earliest end date</n>
  <vis>1</vis>
  <type>FEndDate</type>
  <value>2015-01-01</value>
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>30</k>
  <id>Latest end date</id>
  <n>Latest end date</n>
  <vis>1</vis>
  <type>LEndDate</type>
  <value>2015-01-01</value>
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>31</k>
  <id>Number of observations</id>
  <n>Number of observations</n>
  <vis>1</vis>
  <type>ObservCnt</type>
  <value>63</value>
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>32</k>
  <id>Number of empty values</id>
  <n>Number of empty values</n>
  <vis>1</vis>
  <type>EmptyCnt</type>
  <value>0</value>
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>33</k>
  <id>Scale</id>
  <n>Scale</n>
  <vis>1</vis>
  <type>Scale</type>
  <value />
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>34</k>
  <id>Skewness</id>
  <n>Skewness</n>
  <vis>1</vis>
  <type>Skew</type>
  <value />
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
<it>
  <k>35</k>
  <id>Kurtosis</id>
  <n>Kurtosis</n>
  <vis>1</vis>
  <type>Kurt</type>
  <value />
<group>
  <k>5</k>
  <id>Characteristics</id>
  </group>
  </it>
  </its>
  </lanerStatistics>
  </meta>
  </GetWbkMdResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetWbkMd" :
{
"tWbk" :
{
"id" : "S1!M!S!W3"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"useGridAutoAdjust" : "true",
"lanerStatistics" : ""
}
}
}
}

JSON response:

{
"GetWbkMdResult" :
{
"id" :
{
"id" : "S1!M!S!W3"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "2",
"@hf" : "0",
"i" : "WBK_AD",
"n" : "Annual data",
"k" : "5505",
"c" : "2827",
"p" : "5471",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "0",
"windowsPosition" : "Vertical",
"hasPivot" : "0",
"hasLaner" : "1",
"series" :
{
"@count" : "3",
"its" : ""
},
"lanerStatistics" :
{
"its" :
{
"it" :
[
{
"k" : "0",
"id" : "Number of observations",
"n" : "Number of observations",
"vis" : "1",
"type" : "ObsCount",
"value" : "",
"group" :
{
"k" : "1",
"id" : "General"
}
},
{
"k" : "1",
"id" : "Determination coefficient (R^2)",
"n" : "Determination coefficient (R^2)",
"vis" : "1",
"type" : "R2",
"value" : "",
"group" :
{
"k" : "2",
"id" : "Performance criteria"
}
},
{
"k" : "2",
"id" : "Adjusted determination coefficient (adj R^2)",
"n" : "Adjusted determination coefficient (adj R^2)",
"vis" : "1",
"type" : "AdjR2",
"value" : "",
"group" :
{
"k" : "2",
"id" : "Performance criteria"
}
},
{
"k" : "3",
"id" : "Fisher statistic (F)",
"n" : "Fisher statistic (F)",
"vis" : "1",
"type" : "Fstat",
"value" : "",
"group" :
{
"k" : "2",
"id" : "Performance criteria"
}
},
{
"k" : "4",
"id" : "Fisher statistic probability (p-v)",
"n" : "Fisher statistic probability (p-v)",
"vis" : "1",
"type" : "ProbFstat",
"value" : "",
"group" :
{
"k" : "2",
"id" : "Performance criteria"
}
},
{
"k" : "5",
"id" : "Log-likelihood function (LogL)",
"n" : "Log-likelihood function (LogL)",
"vis" : "1",
"type" : "LogL",
"value" : "",
"group" :
{
"k" : "2",
"id" : "Performance criteria"
}
},
{
"k" : "6",
"id" : "Akaike information criterion (AIC)",
"n" : "Akaike information criterion (AIC)",
"vis" : "1",
"type" : "AIC",
"value" : "",
"group" :
{
"k" : "2",
"id" : "Performance criteria"
}
},
{
"k" : "7",
"id" : "Schwarz information criterion (SC)",
"n" : "Schwarz information criterion (SC)",
"vis" : "1",
"type" : "SC",
"value" : "",
"group" :
{
"k" : "2",
"id" : "Performance criteria"
}
},
{
"k" : "8",
"id" : "Standard error (SE)",
"n" : "Standard error (SE)",
"vis" : "1",
"type" : "SE",
"value" : "",
"group" :
{
"k" : "2",
"id" : "Performance criteria"
}
},
{
"k" : "9",
"id" : "Durbin–Watson statistic (DW)",
"n" : "Durbin–Watson statistic (DW)",
"vis" : "1",
"type" : "DW",
"value" : "",
"group" :
{
"k" : "3",
"id" : "Diagnostic criteria"
}
},
{
"k" : "10",
"id" : "Lower limit probability",
"n" : "Lower limit probability",
"vis" : "1",
"type" : "DWLowerBound",
"value" : "",
"group" :
{
"k" : "3",
"id" : "Diagnostic criteria"
}
},
{
"k" : "11",
"id" : "Upper limit probability",
"n" : "Upper limit probability",
"vis" : "1",
"type" : "DWUpperBound",
"value" : "",
"group" :
{
"k" : "3",
"id" : "Diagnostic criteria"
}
},
{
"k" : "12",
"id" : "Mean error",
"n" : "Mean error",
"vis" : "1",
"type" : "ME",
"value" : "",
"group" :
{
"k" : "4",
"id" : "Residual analysis"
}
},
{
"k" : "13",
"id" : "Mean absolute error",
"n" : "Mean absolute error",
"vis" : "1",
"type" : "MAE",
"value" : "",
"group" :
{
"k" : "4",
"id" : "Residual analysis"
}
},
{
"k" : "14",
"id" : "Mean squared error",
"n" : "Mean squared error",
"vis" : "1",
"type" : "MSE",
"value" : "",
"group" :
{
"k" : "4",
"id" : "Residual analysis"
}
},
{
"k" : "15",
"id" : "Root mean squared error",
"n" : "Root mean squared error",
"vis" : "1",
"type" : "SqMSE",
"value" : "",
"group" :
{
"k" : "4",
"id" : "Residual analysis"
}
},
{
"k" : "16",
"id" : "Residual variance",
"n" : "Residual variance",
"vis" : "1",
"type" : "VE",
"value" : "",
"group" :
{
"k" : "4",
"id" : "Residual analysis"
}
},
{
"k" : "17",
"id" : "Standard deviation of residuals",
"n" : "Standard deviation of residuals",
"vis" : "1",
"type" : "SEE",
"value" : "",
"group" :
{
"k" : "4",
"id" : "Residual analysis"
}
},
{
"k" : "18",
"id" : "Minimum",
"n" : "Minimum",
"vis" : "1",
"type" : "Min",
"value" : "0.61346821",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "19",
"id" : "Maximum",
"n" : "Maximum",
"vis" : "1",
"type" : "Max",
"value" : "1.68005197",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "20",
"id" : "Average",
"n" : "Average",
"vis" : "1",
"type" : "Average",
"value" : "1.139227082222222",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "21",
"id" : "Median",
"n" : "Median",
"vis" : "1",
"type" : "Median",
"value" : "1.14567254",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "22",
"id" : "Mode",
"n" : "Mode",
"vis" : "1",
"type" : "Mode",
"value" : "0.69913685",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "23",
"id" : "Standard deviation",
"n" : "Standard deviation",
"vis" : "1",
"type" : "StDev",
"value" : "0.3502606231582123",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "24",
"id" : "Variance",
"n" : "Variance",
"vis" : "1",
"type" : "Dispersion",
"value" : "0.1226825041351792",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "25",
"id" : "Start date",
"n" : "Start date",
"vis" : "1",
"type" : "StartDate",
"value" : "",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "26",
"id" : "End date",
"n" : "End date",
"vis" : "1",
"type" : "EndDate",
"value" : "",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "27",
"id" : "Earliest start date",
"n" : "Earliest start date",
"vis" : "1",
"type" : "FStartDate",
"value" : "1995-01-01",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "28",
"id" : "Latest start date",
"n" : "Latest start date",
"vis" : "1",
"type" : "LStartDate",
"value" : "1995-01-01",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "29",
"id" : "Earliest end date",
"n" : "Earliest end date",
"vis" : "1",
"type" : "FEndDate",
"value" : "2015-01-01",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "30",
"id" : "Latest end date",
"n" : "Latest end date",
"vis" : "1",
"type" : "LEndDate",
"value" : "2015-01-01",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "31",
"id" : "Number of observations",
"n" : "Number of observations",
"vis" : "1",
"type" : "ObservCnt",
"value" : "63",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "32",
"id" : "Number of empty values",
"n" : "Number of empty values",
"vis" : "1",
"type" : "EmptyCnt",
"value" : "0",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "33",
"id" : "Scale",
"n" : "Scale",
"vis" : "1",
"type" : "Scale",
"value" : "",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "34",
"id" : "Skewness",
"n" : "Skewness",
"vis" : "1",
"type" : "Skew",
"value" : "",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
},
{
"k" : "35",
"id" : "Kurtosis",
"n" : "Kurtosis",
"vis" : "1",
"type" : "Kurt",
"value" : "",
"group" :
{
"k" : "5",
"id" : "Characteristics"
}
}
]
}
}
}
}
}
public static GetWbkMdResult GetWbkStat(WbkId wbk)
{// Set operation execution parameters
var tOp = new GetWbkMd
{
tWbk = wbk,
tArg = new GetWbkMdArg
{// Set pattern for getting data
pattern = new WbkMdPattern
{
lanerStatistics = new LnStatisticsPattern()
}
}
};
// Create proxy object for operation execution
var somClient = new SomPortTypeClient();
// Execute operation
var gRes = somClient.GetWbkMd(tOp);
Console.WriteLine("Workbook statistics are obtained: " + gRes.id.id);
// Display statistics in the console window
Console.WriteLine("---Statistics---");
LnStatistics stats = gRes.meta.lanerStatistics;
ulong gKey = 0;
foreach (LnStatistic st in stats.its)
{
if (gKey != st.group.k)
{
Console.WriteLine("".PadRight(3) + st.group.id);
gKey = st.group.k;
}
Console.Write("".PadRight(6) + st.n + "(" + st.type + "): ");
if (st.value != "") {Console.WriteLine(st.value);}
else {Console.WriteLine("-");}
};
return gRes;
}

See also:

GetWbkMd: Operation