Hello!
I have some doubts regarding if I am interpreting the results from command margins the correct way, and would like to get them clarified. From what I've been seeing in this forum, my conclusions make some sense, but I am still not sure.
The code I have is the following:
streg i.e_ger log_trabalhadores innovator1 exporter1 tech_intensity i. ano i.region, dist(exp) nolog vce(cluster NPC_FIC)
margins if(last==1), dydx(i.e_ger log_trabalhadores innovator1 exporter1 tech_intensity) pr(ha)
For which I get the following results:
-----------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
------------------+----------------------------------------------------------------
e_ger |
2 | .0515833 .0021922 23.53 0.000 .0472866 .0558799
3 | .0596736 .0028226 21.14 0.000 .0541414 .0652058
4 | .0482877 .0028327 17.05 0.000 .0427356 .0538398
|
log_trabalhadores | -.0293776 .0012456 -23.58 0.000 -.031819 -.0269362
innovator1 | -.0114965 .0044032 -2.61 0.009 -.0201267 -.0028663
exporter1 | -.0188348 .0032456 -5.80 0.000 -.0251961 -.0124735
tech_intensity | -.0120283 .0036996 -3.25 0.001 -.0192793 -.0047773
-----------------------------------------------------------------------------------
Is it correct to say that, log_trabalhadores (which is the logarithm of current size, making it a continuous variable) has a negative impact on hazard ratio, suggesting a decrease of 2.9 percentage points in the hazard ratio associated with a 1% increase in current size?
Regarding the variable innovator1 (which is a binary variable that is 1 for innovators and 0 for non-innovators), is it correct to say that for innovators, when compared to non-innovators, the expected decrease in hazard ratio is of 1.15 percentage points?
Another question I have is regarding the interactions I created. All of them are displayed with no problem, but when it comes to the interaction between tech_intensity and log_trabalhadors, I have a a question I can't seem to find the answer to. The code I've been using is the following:
streg e2 e3 e4 i.tech_intensity##c.log_trabalhadores innovator1 exporter1 i. ano i.region, dist(exp) nolog nohr vce(cluster NPC_FIC)
margins i.tech_intensity, dydx(log_trabalhadores) at(log_trabalhadores = (0 1 2 3 4 5 6 7)) expression(exp(predict(xb)))
marginsplot
This results in a graph with the log_trabalhadores on the x axis, and the effects on predicted hazard on the y axis. However, this graph, although it makes sense, makes it hard to interpret, since the variable on the x axis is in logarithmical form. Is there no way to utilize a log transformed variable when running the streg command, but then obtain the graph with the non-log transformed variable? Based on the research I did, I tried doing - margins i.tech_intensity, dydx(log_trabalhadores) at(log_trabalhadores = (0 1 2 3 4 5 6 7)) expression(exp(predict(xb))) - but it does not seem to work.
Lastly, I would like to compare the results obtained for the classes in my e_ger variable. What I would like to do is to compare each class with the preceding class. I know that, by using the contrast command, such as command ar.e_ger , I am able to do this. However, since I am using the pr(ha) command in my regressions, I am obtaining results for effects on predicted hazard, and not time at which half of all firms will have failed. However, I can't seem to be able to run the contrast command regarding the pr(ha). Is there anyway for me to be able to compare the results from the margins command when I utilize pr(ha), using the contrast command?
Thank you very much!
Related Posts with Doubts regarding margins, logarithmics in marginplot and contrast
Using the egen commandHello, Statalist members, I am a new Stata user. I would like to count the total number from the fi…
Dynamically row sum with conditionsDear Statalisters, I have information about the number of number of stocks bought by company and da…
Referring to the last Variable in A DatasetI'm working with Johns' Hopkins COVID-19 data. It comes in wide format and I must reshape it. The is…
Issues using esttabHi All, I'm now trying to use esttab for generating the table: Could you please explain why I don't …
Looping using list of var with similar prefixHi everyone! I'm getting stuck with something probably silly. I have a number of variables that sh…
Subscribe to:
Post Comments (Atom)
0 Response to Doubts regarding margins, logarithmics in marginplot and contrast
Post a Comment