in Education by
I am trying to export p-values to Excel from the Stata community-contributed command reghdfe: // get data use "http://www.stata-press.com/data/r9/nlswork.dta", clear xtset idcode year // run regression reghdfe ttl_exp age not_smsa msp nev_mar, abs(idcode year) cluster(idcode) // store numbers local rmse = `e(rmse)' // export putexcel A1 = (`rmse') using "export.xlsx" , modify // this works How can I get the p-value of a given variable (say msp) exported to the same Excel document? The ereturn list does not suggest any helpful info, e(V) contains only the covariance matrix. Cross posted on Statalist. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
The following works for me: use "http://www.stata-press.com/data/r9/nlswork.dta", clear xtset idcode year reghdfe ttl_exp age not_smsa msp nev_mar, abs(idcode year) cluster(idcode) ------------------------------------------------------------------------------ | Robust ttl_exp | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | -.008044 .0618821 -0.13 0.897 -.129366 .1132781 not_smsa | -.1616256 .0812134 -1.99 0.047 -.3208472 -.0024039 msp | -.004893 .0634814 -0.08 0.939 -.1293505 .1195645 nev_mar | -.36351 .0955207 -3.81 0.000 -.5507816 -.1762384 ------------------------------------------------------------------------------ local pval = (2 * ttail(e(df_r), abs(_b[msp] / _se[msp]) ) ) display `pval' .93856498 putexcel A1 = (`pval') using "export.xlsx", modify

Related questions

0 votes
    I have encountered a problem during my work. There are over one hundred worksheets in my excel, and I ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I have tried several ways but somehow they dont look clean; I have a URL file in Excel format (400+ urls in a ... easy way to do it? Select the correct answer from above options...
asked Feb 1, 2022 in Education by JackTerrance
0 votes
    I have set up a new, empty, modeless userform, to fix my problem with the least amount of code ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 1, 2022 in Education by JackTerrance
0 votes
    I have updated an Excel add-in that used to work fine apart from some new requirements. I've ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    I am trying to adjust the row height based on the cell value. The operation have to run through ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 1, 2022 in Education by JackTerrance
0 votes
    I have a table: Using vba I need to add a column after UsedRange, add a header and fill cells ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    I have a table: Using vba I need to add a column after UsedRange, add a header and fill cells ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: Extracting Unique values from a list (2 answers) Closed 7 years ago ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 21, 2022 in Education by JackTerrance
0 votes
    I have two sheets sheet1, sheet2. Sheet2 having the with records and duplicate number. like sheet1 1--- ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 16, 2022 in Education by JackTerrance
0 votes
    How do I transfer data from a worksheet to another based on a specific cell value? I tried several ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 22, 2022 in Education by JackTerrance
0 votes
    I am trying to do some validation on the file name before it's saved. Here are my three file- ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 14, 2022 in Education by JackTerrance
0 votes
    How do I transfer data from a worksheet to another based on a specific cell value? I tried several ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I have an issue where i want to import value from a textfile into my excel-document which it does ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    I have 10 worksheets. I want to create a table for each. every table has a different amount of ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    Below, I have code that sends a personalized SMS message and includes the name. I got that part to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
...