Add information to an existing observation, from an other existing observation
Hi! I have the data: ID Value Match IdMatch 1 10 0 - 2 1 0 - 3 5 0 - 4 20 1 2 5 11 1 3 I want to generate a new variable: "ValueMatch". This should collect the value of the match observation. The...
View Articlenlsur quaids: Error message when trying to include demographics and account...
Dear Stata Users I am trying to estimate demand (budget share) of four goods using quaids by using nlsur and writing my own function evaluator program for this to incorporate two demographic variables...
View ArticleHow to calculate absolute reduction and relative reduction in stata
Hello Anyone, I'm relatively new in stata, I have a dataset for baseline and midterm infections of a certain helminthiases infection; I wanted to calculate absolute and relative reductions in...
View ArticleExponential smoothing with damped trend
Dear all, I would like to perform exponential smoothing with a damped trend on my data. I can not find the proper Stata-command(s) to do the task. Do I overlook something? Thank you for your...
View ArticlePanel data IV, ivreg2 and fixed effects
Dear Statalister, Some background: I am currently working on an IV unbalanced panel data model. The model is estimating the effect of regulation to microfinance in a country (instrumented by a dummy...
View ArticleFrom quantitative variable regression coefficient to categorical variable...
I am doing a meta-analysis using admetan command and need all data in one format. I am combining results from papers that give RR of outcome as a comparison of first to fifth quartile of exposure. I...
View ArticleRolling 5 year correlation coefficient
Dear Statalisters, My panel data is organized by industry , firm, year, quarter. I present the first 40 observations below. I want to compute the correlation coefficient on a rolling 5-year(20 quarter)...
View ArticleShaping data 2
Hello, I have data shaping like that : : str1(v1 v2) byte v3 "A" "B" 1 "A" "C" 2 "A" "D" 5 "A" "E" 6 "B" "C" 4 "B" "D" 3 "B" "E" 2 "C" "D" 5 "C" "E" 4 "C" "F" 7 "C" "G" 8 "D" "E" 1 "D" "F" 2 "D" "G" 1...
View ArticlePrediction model for stock data
Hi, I am having some daily data for different stocks (open, low, high and last prices) plus the index and was wondering which model can I use to do the prediction? Thanks in advance. Michael
View ArticleRunning Survival Analysis only on Propensity Matched Treatment and Control...
Hello everyone! I have a (potentially) straightforward issue. My objective is to propensity match subjects from two different locations (this is the treatment variable, 'CN', 1= from CN, 0 = not from...
View Articleforeach: if not found
Dear statalisters, my data is a panel in long format. I'm trying to generate time-indexed variables with the values of a certain variable to a specific time from a specific observation as a variable...
View Articlecontrol varibles not significant
Hello everybody, I have just one question regarding control variables. I am running a two-way fixed effects model, based on time and entity fixed effects (where entities are firms), and I have applied...
View ArticleChecking for Multicollinearity in FE-Model
Hello, if I use my pooled regression I just use the variance inflation factor.(VIF) to check for multicollinearity. 1) But how can I check for it, if I use the fixed effects model? 2) Can you also tell...
View Articleextracting variable from proportion command
Dear colleagues I am trying to take the proportion of people infected (outcny) per household (hhid) calculated in this command - proportion outcny, over (hhid) and make it into a variable (see...
View Articletsset quarterly data
Dear all, I want to calculate the GDP growth for the US. I downloaded quarterly GDP data from a database. The data looks as follows: Q1 1977 5799 Q2 1977 5913 Q3 1977 6017 Q4 1977 6018 Q1 1978 6039 Q2...
View Articlelooping through dates adding 1 date by date and id
Hello List I have a dataset consisting of 6459 unique ids, covering 166303 events, presented in long format. I need to tsset my data to be able to use - panelthin - My problem is that each id may have...
View Articledates in Stata
Dear all, My dates (variable 'date' which is string) are in the form DD-MON-YY e.g., 01-Jan-05 or 06-Mar-01 etc. What should I do so that Stata can read these dates? I have tried several different...
View ArticleNormalising a variable to be between 0 and 1
Hi all, I have four variables which each have values which range between -2.5 and 2.5. I would like to alter the values of the variables so they are between 0 and 1. How do I go about doing that?!
View ArticleRunning a Roy model in Stata (by hand?)
Dear Statalist members, I am having an issue that I could not solve by scrolling various fora, manuals and papers... I have a Roy model type of problem: I would like to assess the effect of a binary...
View Article'no observations' error, but I don't have any missing data
Hi all, I'm brand new to STATA so please forgive me if this is a stupid question. I've tried searching the forum and found that the 'no observations' error occurs in a regression when there are likely...
View Article