You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@madlib.apache.org by fm...@apache.org on 2021/02/02 19:49:23 UTC
[madlib] branch master updated: fix error in marginal effects
example
This is an automated email from the ASF dual-hosted git repository.
fmcquillan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/madlib.git
The following commit(s) were added to refs/heads/master by this push:
new a70a877 fix error in marginal effects example
a70a877 is described below
commit a70a8776fea111afef353f91f0bad93ffa13b6ab
Author: Frank McQuillan <fm...@pivotal.io>
AuthorDate: Tue Feb 2 11:48:55 2021 -0800
fix error in marginal effects example
---
src/ports/postgres/modules/regress/marginal.sql_in | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/ports/postgres/modules/regress/marginal.sql_in b/src/ports/postgres/modules/regress/marginal.sql_in
index a19424e..3cb3f8a 100644
--- a/src/ports/postgres/modules/regress/marginal.sql_in
+++ b/src/ports/postgres/modules/regress/marginal.sql_in
@@ -38,9 +38,7 @@ computed is the average of the marginal effect at every data point present in th
source table.
MADlib provides marginal effects regression functions for linear, logistic and
-multinomial logistic regressions.
-
-@warning The margins_logregr() and margins_mlogregr() functions have been deprecated in favor of the margins() function.
+multinomial logistic regressions. The implementation is similar to reference [1].
@anchor margins
@par Marginal Effects with Interaction Terms
@@ -321,11 +319,11 @@ DROP TABLE IF EXISTS margins_table;
SELECT madlib.logregr_train( 'patients',
'model_table',
'second_attack',
- 'ARRAY[1, treatment, trait_anxiety, treatment^2, treatment * trait_anxiety]'
+ 'ARRAY[1, treatment, trait_anxiety, treatment * trait_anxiety]'
);
SELECT madlib.margins( 'model_table',
'margins_table',
- 'intercept, treatment, trait_anxiety, treatment^2, treatment*trait_anxiety',
+ 'intercept, treatment, trait_anxiety, treatment*trait_anxiety',
NULL,
NULL
);
@@ -347,7 +345,7 @@ and view the results (using different names in 'x_design').
DROP TABLE IF EXISTS result_table;
SELECT madlib.margins( 'model_table',
'result_table',
- 'i, tre, tra, tre^2, tre*tra',
+ 'i, tre, tra, tre*tra',
NULL,
'tre'
);
@@ -475,7 +473,7 @@ We use the delta method for calculating standard errors on the marginal effects.
@literature
-[1] mfx function in STATA: http://www.stata.com/help.cgi?mfx_option
+[1] Marginal effects in Stata: https://www.stata.com/
@anchor related
@par Related Topics