Hello all,
I am running a non-linear regression that looks like this:
vcemway reg ln_y x x^2 i.year FE1 FE 2 FE3, cluster(region year)
I then use the regression coefficients to predict E(Y | X) as follows:
gen beta_S = _b[x]
gen beta_S_sq = _b[x^2]
gen beta_cons = _b[_cons]
gen FE1_mem = _b[hh_members]
gen FE2_KasP =_b[region1]
gen FE3_KusP =_b[region2]
gen share_gen = exp(beta_cons + rand_S*beta_S + rand_S*rand_S*beta_S_sq + FE1_mem + FE2_KasP + FE3_KusP)
Here, rand_S is a variable containing random values of my random variable.
*Output graph*
graph twoway (lpoly share_gen rand_S)
My question is, how can I compute the upper and lower bounds of the confidence intervals to include them in the graph? I am looking to create new variables and plotting them using lpoly.
Any other suggestions would also be welcome! Thank you very much in advance!
Related Posts with Quadratic regression: adding CI to lpoly graph
ols vs logistic regressionGood evening ladies and gents May I ask for your expertise in choosing the above. I want to test th…
How to label discrete variables on histogramI'm doing a histogram of continuous variable (quallife), discrete by two categories in a binary vari…
Paired t-test for unmatched subjects impossible to compute?I know that this is Stata Forum (not SPSS)! But I came across a very interesting discussion that may…
Question about time series data with multiple factorsI am trying to format my data to allow me to designate it as time series and use the lag and lead op…
Setting .do file templateHello all, I was wondering if there is a way to set a template for all new .do files. I am mostly lo…
Subscribe to:
Post Comments (Atom)
0 Response to Quadratic regression: adding CI to lpoly graph
Post a Comment