Forest plot of sub-groups and testing for interaction
Dear Statlist, I'm trying to generate a forest plot to demonstrate how various parameters from my regression analysis differ between men and women. The project is looking at whether various clinical...
View ArticleShould I use a heckman selection model when extracting a subset of my data...
This is a new topic for me, so pardon my basic understanding of the heckman model. In fact, it's possible I should not be using a selection model at all, so I wanted to check first. My dependent...
View ArticleAdding post-estimation results in -esttab- table by adding more columns to...
Dear Statalist, I want to put -nlcom- results in esttab table and these -nlcom- results are treated the same way as other regression variables in the esttab table. For example, this is the regression i...
View ArticleDrop (Keep) observations
Dear experts, I'm wondering how to drop (or keep) my observations. Below is my dataset. What I wanted to do is this: If in a particular year there are two observations with adjustment shows "0" and...
View ArticleDynamic Panel Models
Hi, I try to build model in Stata with xtabond. When I should use option vce(robust)? Or when should I use onestep or twostep? Firstly, I made xtabond..., vce(robust). Sargan test has good results...
View ArticleHow to create a percentage variable
Hello, I have a categorical variable for ethnicity. When I tabulate it I can see that there are percentages assigned to each one. I want to create a new variable called availability ratio which is...
View ArticleUsing "lincom" after "margins"
Hello. I have a question with respect to using the lincom command after the margins command. Specifically: Code: margins, dydx(x1 x2) at(x1=(-1 1) m=1) at(x2=(-1 1) m=1) The output is the following:...
View Article-domin- (SSC): computing time /max. number of independent variables
Hi everybody, I am using Stata 16.0 and I am trying to perform dominance analysis using the -domin- command from SSC in combination with the -mixdom- module. My code is the following: Code: domin...
View ArticlePanel Data - treatment*for group data based on within group characteristics
Hello, I am interested in assigning a treatment to a firm if it was domestic (foreign=0) in year 2003 and foreign (foreign=1) in 2004. All firms for wich this criterion holds should be counted as...
View ArticleDeflate wages with deflator from different file
Hello, I need to deflate my wages with a consumer price index which I have in a different file. How can I do this? Thank you in advance.
View ArticleProblems with stset on long data
Hi, I'm trying to stset survival data in long format. I used reshape to convert from wide to long: Code: . reshape long PartDat PartAg HADSAnxi HADSDepr, i(id) j(_j) (note: j = 2 3) Data wide ->...
View ArticleAccess instance, class, or function "own" identifiers...
In class programming, is there a way to access an instance's, class's or member function's own identifier programmatically from within a class or function definition? The current use case is to display...
View ArticleDecay measure variable using unbalanced panel data
Hello everybody, I would really appreciate any help someone can provide with some coding. I am trying to create a decay measure of a variable that will decrease each year by 1/n (n=the number of years...
View ArticleInterpretation of interaction term with ologit regression
Hi all, I have a question about the interpretation of my results, regarding a moderator in an ologit regression. My IV is 'green attitude', my DV is 'greenbuying' and my moderator is 'ecolabel trust'....
View ArticleTime dummies in xtabond and xtdpdsys
Hi, I made three year dummies. One is for 2005-2006, second is for 2007-2013 and third is for 2014-2017. I included only two last variables in xtabond and xtdpdsys models. Is it normal that Stata...
View ArticleCoding for three groups - cases, controls , and other diseases - What a dilemma!
Hi Statalist, I am new her but I have learned a lot from you so far, so thank you all. I am using STATA IC 15.1 and the problem I am facing is as follows: There are 17 variables e.g. n_1_0 to n_3_2 and...
View Articlenegative constant value for binary outcome
I am using the xtivreg command for a binary outcome, but the constant that Stata is producing is negative. Is this possible? How can I check what is going on?
View ArticleHow to best illustrate trends/distributions of many data points?
Hi everyone, I have a lot of data from an experiment and would like to find the best way to display it - been trying it for hours and about to give up. I want to display two data points per individual:...
View ArticleHelp with Regression Interaction Term Command
Dear all, I am using Stata 16, on mac. I need help estimating the following model Array Where educi x urbani is an interaction term I used the command: regress wage educ urban i.educ i.urban, but I am...
View Article