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
Event Study helpHi i'm doing a 'market model' style event study. I'm looking at the effects of a Fed announcement u…
Loop for specific range and store valueHello I am new to Stata. One of my assignment is to replicate Fama French 3. I did it in Matlab; how…
Problems with an unbalanced panelWhilst declaring my panel and time variables in order to do the synthetic control method, (synth), m…
Moving Kurtosis & Skewness for Panel DataI have a panel data for 20000 stocks over a sample period from 1950 to 2018. What I need to do is to…
How to create an averaged scale from multiple variables?I would like to create an averaged scale created from five variables for each observation. Each of m…
Subscribe to:
Post Comments (Atom)
0 Response to Quadratic regression: adding CI to lpoly graph
Post a Comment