cmd_logistic Function (ROM Call 0x360)

AMS 1.01 or higher bascmd.h

void cmd_logistic (ESI RegData);

Executes TI-Basic 'Logistic' command.

cmd_logistic calculates a logistic regression and updates all statistics variables (see TI-Basic manual for more info). The RegData parameter must point to a structure on the expression stack which describes where the actual data is stored. This structure may have one of the following eight layouts (RegData should point to the last item):

NOTHING_TAG NOTHING_TAG NOTHING_TAG NOTHING_TAG y_list_name x_list_name
NOTHING_TAG NOTHING_TAG NOTHING_TAG iterations y_list_name x_list_name
NOTHING_TAG NOTHING_TAG freqs_name NOTHING_TAG y_list_name x_list_name
NOTHING_TAG NOTHING_TAG freqs_name iterations y_list_name x_list_name
END_TAG categories_list LIST_TAG categories_name NOTHING_TAG NOTHING_TAG y_list_name x_list_name
END_TAG categories_list LIST_TAG categories_name NOTHING_TAG iterations y_list_name x_list_name
END_TAG categories_list LIST_TAG categories_name freqs_name NOTHING_TAG y_list_name x_list_name
END_TAG categories_list LIST_TAG categories_name freqs_name iterations y_list_name x_list_name

x_list_name is the VAT symbol name (see SYMSTR and Tags for more info) of a TI-Basic list variable which contains the x values. y_list_name is the VAT symbol name of a TI-Basic list variable which contains the y values. iterations is an integer expression; if it is omitted, 64 is assumed. It specifies the maximum number of iterations in which a solution will be attempted (larger values result in better accuracy but longer execution times, and vice versa). freqs_name (if present) is the VAT symbol name of a TI-Basic list variable which contains the frequencies (all frequencies are assumed to be 1 if freqs_name is not present). categories_name (if present) is the VAT symbol name of a TI-Basic list which contains the category of each item. categories_list represents a list of integer items determining which categories will be included (this makes sense only when categories_name is used).

See cmd_linreg for more information.


Uses: HeapAlloc, HeapDeref, HeapFree, HeapFreeIndir, HeapRealloc, HLock, ER_catch, ER_success, ER_throwVar, estack_to_ushort, next_expression_index, ST_helpMsg, XR_stringPtr, ceil, fabs, floor, sqrt, ck_valid_float, estack_to_float, is_cFloat_agg, OO_GetAppAttr, PlotInit, PlotPut, RM_Type, statFree, statStart, MakeWinRect, WinFill, WinFillTriangle, WinLine, WinRect, WinStrXY, _bcd_math, ROM Call 0x46B, ROM Call 0x4CB


See also: cmd_linreg, cmd_quadreg, cmd_cubicreg, cmd_quartreg, cmd_powerreg, cmd_expreg, cmd_lnreg, cmd_sinreg, cmd_onevar, cmd_twovar, cmd_medmed