|
MADlib
1.0 A newer version is available
User Documentation
|
SQL functions for linear regression. More...
Go to the source code of this file.
Functions | |
| aggregate marginal_logregr_result | marginal_logregr (boolean dependentVariable, float8[] independentVariables, float8[] coef) |
| Compute marginal effects for logistic regression. More... | |
| void | margins_logregr (varchar source_table, varchar out_table, varchar dependent_varname, varchar input_independent_varname, varchar input_group_cols, integer[] marginal_vars, integer max_iter, varchar optimizer, float8 tolerance, boolean verbose_mode) |
| A wrapper function for the various marginal regression analyzes. More... | |
| CREATE OR REPLACE FUNCTION MADlib | margins_logregr (source_table VARCHAR--name of input table, out_table VARCHAR--name of output table, dependent_variable VARCHAR--name of dependent variable, independent_variable VARCHAR--name of independent variable) RETURNS VOID AS $$BEGIN PERFORM MADlib.margins_logregr(source_table |
| Marginal effects with default variables. | |
| CREATE OR REPLACE FUNCTION MADlib | margins_logregr (source_table VARCHAR--name of input table, out_table VARCHAR--name of output table, dependent_variable VARCHAR--name of dependent variable, independent_variable VARCHAR--name of independent variable, grouping_cols VARCHAR--name of grouping cols) RETURNS VOID AS $$BEGIN PERFORM MADlib.margins_logregr(source_table |
| Marginal effects with default variable_names. | |
| CREATE OR REPLACE FUNCTION MADlib | margins_logregr (source_table VARCHAR--name of input table, out_table VARCHAR--name of output table, dependent_variable VARCHAR--name of dependent variable, independent_variable VARCHAR--name of independent variable, grouping_cols VARCHAR--name of grouping cols, marginal_vars INTEGER[]--indices of variables to calculate marginal effects on) RETURNS VOID AS $$BEGIN PERFORM MADlib.margins_logregr(source_table |
| Marginal effects with default variable_names. | |
| CREATE OR REPLACE FUNCTION MADlib | margins_logregr (source_table VARCHAR--name of input table, out_table VARCHAR--name of output table, dependent_variable VARCHAR--name of dependent variable, independent_variable VARCHAR--name of independent variable, grouping_cols VARCHAR--name of grouping cols, marginal_vars INTEGER[]--indices of variables to calculate marginal effects on, max_iter INTEGER--Max iterations for the logstic regression inner call) RETURNS VOID AS $$BEGIN PERFORM MADlib.margins_logregr(source_table |
| Marginal effects with default variable_names. | |
| CREATE OR REPLACE FUNCTION MADlib | margins_logregr (source_table VARCHAR--name of input table, out_table VARCHAR--name of output table, dependent_variable VARCHAR--name of dependent variable, independent_variable VARCHAR--name of independent variable, grouping_cols VARCHAR--name of grouping cols, marginal_vars INTEGER[]--indices of variables to calculate marginal effects on, max_iter INTEGER--Max iterations for the logstic regression inner call, optimizer VARCHAR--Logistic regression optimizer) RETURNS VOID AS $$BEGIN PERFORM MADlib.margins_logregr(source_table |
| Marginal effects with default variable_names. | |
| CREATE OR REPLACE FUNCTION MADlib | margins_logregr (source_table VARCHAR--name of input table, out_table VARCHAR--name of output table, dependent_variable VARCHAR--name of dependent variable, independent_variable VARCHAR--name of independent variable, grouping_cols VARCHAR--name of grouping cols, marginal_vars INTEGER[]--indices of variables to calculate marginal effects on, max_iter INTEGER--Max iterations for the logstic regression inner call, optimizer VARCHAR--Logistic regression optimizer, tolerance DOUBLE PRECISION--Tolerance) RETURNS VOID AS $$BEGIN PERFORM MADlib.margins_logregr(source_table |
| Marginal effects with default variable_names. | |
Definition in file marginal.sql_in.
| aggregate marginal_logregr_result marginal_logregr | ( | boolean | dependentVariable, |
| float8[] | independentVariables, | ||
| float8[] | coef | ||
| ) |
| dependentVariable | Column containing the dependent variable |
| independentVariables | Column containing the array of independent variables |
| coef | Column containing the array of the coefficients (as obtained by logregr) |
independentVariables array to 1.margins FLOAT8[] - Array of marginal effectscoefFLOAT8[] - The coefficients for the regressionstd_err FLOAT8[] - Array of standard-errors (calculated by the delta method),t_stats FLOAT8[] - Array of t-statisticsp_values FLOAT8[] - Array of p-valuesSELECT marginal_logregr(dependentVariable, independentVariables, coef) FROM dataTable;
Definition at line 366 of file marginal.sql_in.
| void margins_logregr | ( | varchar | source_table, |
| varchar | out_table, | ||
| varchar | dependent_varname, | ||
| varchar | input_independent_varname, | ||
| varchar | input_group_cols, | ||
| integer[] | marginal_vars, | ||
| integer | max_iter, | ||
| varchar | optimizer, | ||
| float8 | tolerance, | ||
| boolean | verbose_mode | ||
| ) |
| source_table | String identifying the input table |
| out_table | String identifying the output table to be created |
| dependent_varname | Column containing the dependent variable |
| input_independent_varname | Column containing the array of independent variables |
| grouping_cols | Set of columns to group by. |
| marginal_vars | Subset of independent variables to calculate marginal effects for. |
| max_iter | Maximum number of iterations |
| optimzer | Optimizer to be used (newton/irls, cg or idg) |
| tolerance | Resiual tolerance |
| verbose_mode | Verbose mode (on/off) |
independentVariables array to 1.select margins_logregr(source_table, out_table, dependentVariable, independentVariables);
Definition at line 496 of file marginal.sql_in.