twoway graph: adding vertical lines
Hello I've got troubles with adding vertical lines in my twoway time series graph . On my y-axis there is the average TV-audience of 184 Champions League games and on the x-axis there is my time...
View ArticleOutlier detection for seasonal time series data
I have 3 years of highly seasonal visit data by month to hospitals. I'm looking to detect outliers in this seasonal dataset, using an appropriate outlier detection method. I've attempted to use the...
View ArticleLoop only through string variables from my variable list
Hi I have two almost identical datasets. I want to find any discrepancies between the variables. I have merged the two datasets. I therefore have 100 variables named var1 to var100. Then I have 100...
View ArticleBeta-Pricing model in GMM
Hi :-) I am struggling to implement what should really be a straightforward beta-pricing model in GMM from the Asset pricing textbook by Cochrane (2005). It reads... Array I run the following command...
View Articlegsvy
hi guys! for some reason gologit2 with gsvy does not return the pseudo R2. is there a reson for that? Code: gsvy, subpop(flag): gologit2 y i.x, autofit gamma or thanks, natalia
View ArticleThe use of HAC standard errors with the command -nl (is it possible with...
Hello all, I have a panel data set with N=9 and T= 72. That is, it is dominated by the time dimension. I am using Nonlinear Least Squares to estimate y_it = G(X_it, Beta) where X is a vector. Since I...
View ArticleStandard deviation in a rolling window
Hello, I want to have have the standard deviation of the last 250 days. I want to do this for each day and I have a huge sample (more than 4 milion observations). I tried to use asrol but it does not...
View ArticleLatent class growth modelling - GLLAMM - modeling time
Dear all, I am working on the study where I would like to identify the distinct subgroups of subjects following the similar patterns of change in a measurement values over time. For this purpose I used...
View ArticleHow to create variables that are interactions of observations
Hi Statalist, I have data on the output of a number of workers in a firm for different processes. Each process has a target output. My goal is to divide each observation by the target output of that...
View ArticleHow to keep the coefficient of important variable and F statistic is normal
Hello, I am a beginner of STATA user. My dataset is under export, importer, year, and product level. For example, a product is exported from China to Japan in 2016. The dependent variable is trade gap,...
View ArticleSpam email sent
Dear all, My message below is just to raise a red flag concerning the privacy of this site. In case other members have got similar spam email. I received a spam email from Melissa Vici, claiming she is...
View ArticleMean per year and individual
Hi, Stata users! I have panel data through a sample of years, and I would like to obtain the average of education years in each year, taking into account the information of the past years and not all...
View ArticleHow to create a new variable from an existing variable?
I have a variable for a country's annual total GDP. How do I get the annual changes in the GDP rates? Obviously, first year will be zero, because I don't have the value for t-1, but how to create a new...
View Article"inlist" - expression too long
I've just received the error message "expression too long" when trying to run an "inlist" command that involves a long list of about 1000 numerals, as follows: gen newvar = 0 foreach var of varlist...
View ArticleDelete a matrix trace
Hello, I would like to know how to delete the trace of a matrix. I do not find it in the "help". Thank you
View ArticlePanel data: Using the xtlogit command with cont. and dummies
Dear Statalist-members. I have a question in regards of utilizing the xtlogit command for panel data. I am currently doing research on the probability of rental cars obtaining a rental contract given...
View Articleproblem with xtset
Dear Statalist, I want to combine three datasets. In dataset 1 (my main dataset) I have a panel with firm (ORDINAL) and time (year, from 1990 to 2013) and some other variables as for example sectors...
View ArticleHow can I check that a variable exists?
Dear StataList, I have a fairly simply task that I'd appreciate help with. I'm trying to write a block of code that will work on a number of different datasets. I'd like the code to put the variables...
View Articlemultilevel multiple imputation
Hello everyone, I want to do the following three things but am not sure how/whether they can be done:multiply impute multilevel data. I would be ok with just accounting for clusters, but I need to...
View Articleproblem with LR test in sfpanel
Hello everybody, After estimation of my stochastic cost-frontier with the command sfpanel with specification bc95, I'm trying to perform an LR test of the one-sided error with the null hypothesis of no...
View Article