Interacting with Time for the Andersen-Gill Formulation of the Cox Model
Hi all, I have an interesting dilemma. I have a survival dataset that has been formatted using the Andersen-Gill counting process - i.e. multiple lines per patient to accommodate time-varying and time...
View Articlereclink problem
Dear statalisters: I am using Michael Blasnik's reclink (from SSC) to match records. I get extremely high matching scores, and yet the records do not match. What may be the problem? reclink eco_nom...
View ArticleStata coding question - Running wald test of equality after simultaneous...
Hi Statalisters, I am using the -cmp- command to run a simultaneous equations model. I'd like to test (within each equation) whether certain explanatory variables have equivalent coefficients. There...
View Articleoptimize double-sum function
Dear Statalisters, For a dataset sorted on variable x, I wish to maximize the following function with respect to alpha. Here is the Latex equivalent: \sum_i \sum_j [ \arctan(s_i / alpha) - \arctan(s_j...
View ArticleKeeping observations that start with specific digits
Hello, How can I keep observations that start with a certain set of numbers. Specifically, I want to keep observations that start with "3344" within a list of mostly 6-digit numbers. I found a previous...
View ArticleBar and line on same graph
I am using Stata 13. I want to get bar and line on same graph,. I tried following code: Code: twoway bar grp1 grp2 reportyear, stacj || line grdnv reportyear but it returns the error: option stack not...
View ArticleInterpretation of marginal effect and its first difference using mlincom
Hi all I have a question about interpreting results of marginal effects and its first difference correctly. I ran a three-way interaction effect of x1,x2 and x3 using "xtlogit" and estimated marginal...
View ArticleMatching variables by Name
i'm just starting out with stata, so please bear with me. I've got two data sets. the 1st is a list of a population by name and surname. the second is a portion of said population by name and surname,...
View ArticleRecognizing spells of negative and positive values
Hello, I'm having trouble identifying spells in my dataset, which is set as a timeseries. The goal is to identify observations that have had >= 3 negative value changes, followed by one positive...
View ArticleRandom parameters in bayesmh
Hello, Could you please advise how to specify the independent variable "x2" from below as a random parameter? bayesmh z x1 x2 x3 i.id, likelihood(normal({Sigma1})) /// prior({z:_cons} {z: x1} {z: x2}...
View ArticleDownload and install the frmttable package
Dear All, I need to use the frmttable package in a computer that does not have internet access. For that, I think I should download the package in another computer. However, I have not being very...
View Articlefix effect firms
Hello – I want to perform fix effect on firms. My regression is: Y x1 x2 x3 Overall 7000 observations: Firms (around 1500) and Years (around 15); unbalanced. Can you please help what is the code to do...
View ArticleRepeated measures ANCOVA
I have a study in which we evaluated the effects of a drug and pH of the culture medium upon the twitch rate (TR) of tissue in vitro. We hypothesise that TR is affected by both drug and pH, so tissues...
View Articleestat gof
Hello, I am trying to compute a goodness-of-fit test after running a probit model (where most of the predictors are categorical): Code: mi estimate, cmdok vceok esampvaryok: svy: probit depvar...
View ArticleDrop variable from a sample if observation took value below 1
Dear Stata users, my dataset is in panel format. My variables are date, stock_id, adjtprcprev and cover period from 1990 to 2015. I need to drop stock_id from a sample at all if adjtprcprev took value...
View ArticleUnit root testing - LLC test vs. IPS test
Dear all, I am using Stata 14.1 to analyze balanced panel dataset of 11 countries over period 2002-2014 (143 observations). As a first step, I want to check for stationarity of the series, in this...
View Articlextunitroot manual correction
To Stata Corp. Please check Stata user manual and help file for xtunitroot http://www.stata.com/manuals14/xtxtunitroot.pdf in page 7 xtunitroot — Panel data unitroot tests 7 The Im–Pesaran–Shin...
View Articlecompare the best match
Hey Everyone, I could need some advice. I got 5 porfolios sorted by R&D expenditures and 30 control portfolios matched by size and book to market. Now i need to compare the return from the...
View ArticleAdvice on looping :URGENT
So my data set is collected over few rounds and they are stored accordingly. I have created a unique id for households in this data set. Now I need to check and keep only those unique ids which are...
View ArticleHistogram: Include variable in xlabel
Hi all, I'm new to STATA. I just started using it for the first time yesterday. I have some experience coding in C++ and IDL. I have a small question related to inserting a variable in xlabel to...
View Article