Dear Users,
This is a repost as I believe in my previous post I did not clarify exactly what I wanted.
I have a panel dataset at investor-bid level. I want to check if there is a nonlinear relationship between PercentAutoBid and Man2Auto. I then test for this using the nlcom command. Based on the nlcom command and the marginsplot it shows the nonlinearity between the two variables.
I want to add extra coefficients to my plot which are the l.sharpe_ratio coefficients (from the regression). These coefficients I want to plot them at different Lag Share Auto Bidding Levels (PercentAutoBid).
Is this possible using a marginsplot? Using addplot did not work I want the coefficients from the regression itself.
Best
This is a repost as I believe in my previous post I did not clarify exactly what I wanted.
I have a panel dataset at investor-bid level. I want to check if there is a nonlinear relationship between PercentAutoBid and Man2Auto. I then test for this using the nlcom command. Based on the nlcom command and the marginsplot it shows the nonlinearity between the two variables.
Code:
g PercentAutoBid_2 = PercentAutoBid*PercentAutoBid
g inter2 = sharpe_ratio*PercentAutoBid
g inter3 = sharpe_ratio*PercentAutoBid_2
eststo: reghdfe Man2Auto l.sharpe_ratio l.PercentAutoBid l.c.PercentAutoBid#l.c.PercentAutoBid ///
l.inter2 l.inter3, a(LenderId hour LoanId) cluster(interaction)
estadd local LenderId "Yes", replace
estadd local hour "Yes", replace
estadd local LoanId "Yes", replace
est store AutoSwitching
nlcom -_b[l.PercentAutoBid]/(2*_b[l.c.PercentAutoBid#l.c.PercentAutoBid])
margins, at(l.PercentAutoBid = (0(0.1)1))
marginsplot, /*
*/ plot1opts(lc(black) lp(longdash_dot)) ciopt(color(black)) plotopts(mcolor("black")) /*
*/ xline(.786, lstyle(grid) lp(longdash_dot) lc(maroon)) xti("Lag (Share Auto Bidding)") /*
*/ text(0.04 0.77 "Turning Point at 0.786", place(s) orient(vertical) color(black) size(small)) /*
*/ yti("Pr(Switch to Automatic = 1)") title("Panel B: Switching to Automatic") /*
*/ name(plot1, replace)
Is this possible using a marginsplot? Using addplot did not work I want the coefficients from the regression itself.
Best

Comment