.. _fwflag_outcome_interaction: ===================== --outcome_interaction ===================== Switch ====== --outcome_interaction Description =========== Generate correlations for --outcomes like the default --correlate but including a term that is the product of the outcome_interaction variable and the feature group norm variable. Argument and Default Value ========================== interaction variable - The column name of the variable that you would like use in your interaction term. This column must exist in the outcomes table. Details ======= These values are generated by using least squares linear regression. For each feature/outcome pair, we normalize all variables, including feature group norms, control variables and outcome variables by subtracting the mean and dividing by the standard deviation, thus creating a data distribution that has a mean of zero and a standard deviation of 1. We then create a linear model that predicts the outcome value based on the feature group norms, and control variables. B0 + B1*F + B2*C1 + B3*C2 + B3*F*I + B4*I = O_pred From this model three rows will be 3 coefficients per feature output into an rmatrix: xxxxx - corresponds to B1 xxxx with yyyyy - corresponds to B4 group_norm * xxxxx from yyyy - corresponds to B3 Other Switches ============== Required Switches: :doc:`fwflag_outcomes` :doc:`fwflag_outcome_table` Optional Switches: :doc:`fwflag_group_freq_thresh` :doc:`fwflag_outcome_controls` Example Commands ================ .. code:doc:`fwflag_block`:: python # Correlates 1grams with age for every user ~/fwInterface.py :doc:`fwflag_d` twitterGH :doc:`fwflag_t` msgs_en :doc:`fwflag_c` msa_id :doc:`fwflag_group_freq_thresh` 20000 \ :doc:`fwflag_f` 'feat$cat_met_a30_2000_cp_w$msgs_en$msa_id$16to16' \ :doc:`fwflag_outcome_table` jordan_msa \ :doc:`fwflag_outcomes` LSmean_wavg \ :doc:`fwflag_interactions` \ :doc:`fwflag_outcome_interaction` Rpercent_2008 \ :doc:`fwflag_output_interaction_terms` \ :doc:`fwflag_outcome_controls` median_age_wavg percent_white_wavg mean_income_wavg_log percent_bachelors_wavg \ :doc:`fwflag_output_name` fb2000_intr \ :doc:`fwflag_rmatrix` :doc:`fwflag_sort` \ :doc:`fwflag_whitelist` :doc:`fwflag_feat_whitelist` 1543 1087 418 943 1309 18 1826 904 1145 1843 648 277 404 785 752 285 \ 1283 91 230 1529 445 1447 1149 1023 800