vecrank says variables are stationary, dfuller says they are I(1)
Dear Stata Forum, I am confused as according to the stata manual, "vecrank" performs the Johanssen test for cointegration such that if the rank is full, this means that all the variables are...
View ArticleLooping over pairs of values
Dear Stata users! I am familiar with Stata’s different loop commands, such as foreach etc. But how to loop over pairs of values ? I want to loop over connected values of alc1 and alc2, for instance...
View ArticleChoice of coefficients for predicted probabilities after a multinomial logit
Hi everyone, when you need to calculate predicted probabilities after a multinomila logit, when does it make sense to consider all the coefficients and when does it make sens to consider only the...
View ArticleStatistical Analysis: (too?) large coefficient in regression
Dear Statalisters, I'm researching the effect of a share repurchase announcement on the stock price. I use an event study methodology and now I'm trying to explain the cumulative abnormal return (-1;1)...
View ArticleEstimating part-worths of choice-based conjoint analysis
Hello everyone, could you tell me if it's possible to estimate individual's parth-worths of a choice-based conjoint experiment? Thank you very much! With best regards, Anna-Lena
View ArticleQuestion on reclink/probabilistic matching possibilities in STATA
Does oes anyone know if it possible to use reclink or something similar to match multiple times within strings? For example, in dataset 1 I have a string variable which has a list of x medications,...
View ArticleDistribution of marginal effects graph MNML, SPost13 add on, Stata 14
Hello! I am using partyid4.dta from the SPost13 add on with Stata/IC 14.0 I am trying to follow the example in the book by Long & Freese (2014), p.420, Regression models for categorical dependent...
View ArticleKeep observations when available in two adjacent years
Dear all, I have a dataset comprising all firms between 1977 and 2006. I want to calculate some summary statistics regarding leverage ratios. very firm has a unique identifier (a 'gvkey') and have data...
View Articlestring monthly date into Stata monthly date
Hi everyone, I'm having a problem converting a string monthly date into Stata monthly date. The string date starts in 1999 and goes until 2013 and is shown as: Jan-99 Feb-11 and so on. I've tried using...
View ArticleCalculating annualized volatility from daily stock returns
Hi, I am new to Stata and am trying to create annualized volatilities from daily stock returns. Through CRSP I obtained stock price and daily return data on 106 companies for the period of January...
View ArticleQuestion on computing travel time using mqtime
I am using Stata 13 to compute the travel time between two addresses using mqtime of John Voorheis. I am also using the sample dataset (statecap.csv) attached to the mqtime package. I also copied the...
View Articlesubsetting data for a local
Hello it seems like a very simple and basic question but I could not find anythign about it. I just like to subset a value in a dataset for a given year and country. I know I can list it if i just type...
View Articlehow to count the number of non-missing straight lags in a panel for every obs
Hello, here's the task: I have quarterly panel data. the panelvar is not observed every quarter. I want to generate a variable that tells me for every observation how many straight lags I have (here...
View ArticleChoice sets with mlogit
I have a set of horse racing results. I want to use mlogit to determine the coefficients of the variables that lead to the horse winning the race. My data looks like this: Race Horseno Age Weight Win 1...
View ArticleHow to adjust for trend over time in before and after comparision of count data
Dear Stata users, I would like to compare the number of GP visits in acute disease period with that of pre-acute period, and I want the results in terms of risk ratios. So, this is within-person...
View ArticleBilateral trade flows: ppml, heckman, or churdle? Also accounting for...
Hello, I have a cross-section data set with 125 * 124 = 15'500 bilateral trade flows (dyadic data) for my bachleor thesis. I am not estimating trade volume, but rather how many products are being...
View ArticleEstimating annual volatility from daily stock returns
Hi, I am new to Stata and am trying to create annualized volatilities from daily stock returns. Through CRSP I obtained stock price and daily return data on 106 companies for the period of January 2000...
View Articlereplacing a variable if var1 is less then a year since last entry
Dear List. I have a dataset, that i cannot show due to confidentiality clauses in my contract. The dataset consists of: id event_1 event_2 … event_15 date_of_event_1 date_of_event_2 … date_of_event_15...
View Articlegrouping variables and time lapse analysis
Hi guys I am new to stata and data analysis so please bare with my descriptions due to my limited knowledge as I am still learning. I cannot display my data due to confidentiality reasons but I will...
View ArticleDifference-in-Difference
Hello, I want to use the difference-in-difference regression to test the difference between two groups. I use this command: : diff ln_deposit , period(post) treated(T) cov( Year) cluster(ID) rep The...
View Article