Dear Statalist,
I have experimental data on how participants set up and manage financial portfolios. In my regression, I would like to understand better the interaction between the return figure and the treatment.
Four return numbers are randomly drawn from an urn containing ten return numbers (because there are four asset classes per round). The return numbers are stored as double in Stata. The returns are expressed as percentages (i.e., 0.54 is 0.54%). In my regression so far, I used c.return1##i.T_C; however, the output showed only the coefficient for one return figure, not all ten.
The binary treatment variable explains where the participant was assigned to be in the treatment group (T_C ==1) or control group (T_C==0). Action is a binary variable that measures whether an action was taken.
If I omit the c. part in front of the return, I get an error that factor variables may not contain noninteger values.
Next, I tried to use if statements using only one particular return number, such as but the for me most important information was omitted.
I would be most grateful for any advice on how to deal with this matter.
In addition, I would appreciate any guidance on why two coefficients individually are significant, however, their interaction is not.
Thank you very much!
I have experimental data on how participants set up and manage financial portfolios. In my regression, I would like to understand better the interaction between the return figure and the treatment.
Four return numbers are randomly drawn from an urn containing ten return numbers (because there are four asset classes per round). The return numbers are stored as double in Stata. The returns are expressed as percentages (i.e., 0.54 is 0.54%). In my regression so far, I used c.return1##i.T_C; however, the output showed only the coefficient for one return figure, not all ten.
The binary treatment variable explains where the participant was assigned to be in the treatment group (T_C ==1) or control group (T_C==0). Action is a binary variable that measures whether an action was taken.
If I omit the c. part in front of the return, I get an error that factor variables may not contain noninteger values.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double return1 .54 .14 1.63 1.19 .45999999999999996 1.19 -.4699999999999999 .14 -.31 1.63 .54 1.24 .45999999999999996 1.24 .37 -.21 .37 -.31 1.24 1.63 1.24 -.21 .54 -.4699999999999999 -.21 -.4699999999999999 1.24 .14 .37 -.21 .45999999999999996 1.19 1.63 -.4699999999999999 .37 .45999999999999996 1.24 .14 1.63 .45999999999999996 -.21 .37 .54 1.19 -.21 .14 1.24 1.19 .14 .37 1.19 -.31 1.63 -.4699999999999999 .54 -.31 -.21 1.24 -.4699999999999999 .37 -.31 .54 .14 1.24 .45999999999999996 -.21 1.19 -.4699999999999999 .54 -.21 1.19 1.24 .37 -.21 -.31 .45999999999999996 .37 .45999999999999996 1.19 1.63 -.31 .54 -.4699999999999999 1.24 -.31 .45999999999999996 1.63 1.19 1.24 1.63 .54 .37 .54 -.31 1.19 .14 .37 .14 .45999999999999996 -.21 end
Code:
logit action c.return1##i.T_C, vce(cluster CASE) Iteration 0: log pseudolikelihood = -511.78245 Iteration 1: log pseudolikelihood = -498.77008 Iteration 2: log pseudolikelihood = -498.51032 Iteration 3: log pseudolikelihood = -498.50994 Iteration 4: log pseudolikelihood = -498.50994 Logistic regression Number of obs = 920 Wald chi2(3) = 18.68 Prob > chi2 = 0.0003 Log pseudolikelihood = -498.50994 Pseudo R2 = 0.0259 (Std. err. adjusted for 230 clusters in CASE) ------------------------------------------------------------------------------ | Robust action | Coefficient std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- return1 | .3855761 .1633776 2.36 0.018 .0653619 .7057903 | T_C | TG | -.6312159 .2128661 -2.97 0.003 -1.048426 -.2140061 | T_C#c.return1 | TG | -.2061176 .2225996 -0.93 0.354 -.6424049 .2301696 | _cons | 1.365024 .1642466 8.31 0.000 1.043106 1.686941 ------------------------------------------------------------------------------
Next, I tried to use if statements using only one particular return number, such as but the for me most important information was omitted.
Code:
logit action c.return1##i.T_C if return1 == .54, vce(cluster CASE) note: return1 omitted because of collinearity. note: 1.T_C#c.return1 omitted because of collinearity. Iteration 0: log pseudolikelihood = -55.355109 Iteration 1: log pseudolikelihood = -55.312488 Iteration 2: log pseudolikelihood = -55.312477 Iteration 3: log pseudolikelihood = -55.312477 Logistic regression Number of obs = 97 Wald chi2(1) = 0.08 Prob > chi2 = 0.7715 Log pseudolikelihood = -55.312477 Pseudo R2 = 0.0008 (Std. err. adjusted for 97 clusters in CASE) ------------------------------------------------------------------------------ | Robust action | Coefficient std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- return1 | 0 (omitted) | T_C | TG | -.1356126 .4670154 -0.29 0.772 -1.050946 .7797207 | T_C#c.return1 | TG | 0 (omitted) | _cons | 1.126011 .3339311 3.37 0.001 .4715184 1.780504 ------------------------------------------------------------------------------
I would be most grateful for any advice on how to deal with this matter.
In addition, I would appreciate any guidance on why two coefficients individually are significant, however, their interaction is not.
Thank you very much!
Comment