Quantcast
Channel: Statalist
Browsing all 65875 articles
Browse latest View live
↧

Individual weights by date

Hi, I have monthly stock holdings data for 10 years and on each month I need to calculate weights for each stock. For example on each particular month (01/01/2008 in the example) each stock (in column...

View Article


How to change graph formatting

Hi Everyone, I may have an easy question, but I have already spend a lot of time trying to solve it with no success, so I now decided to ask for help, please. I am trying to do plots in STATA (Version...

View Article


Lag variable with gaps in timevar

Hi, I am currently using an unbalanced panel with gaps in the timevar (it's a panel on parties in cabinets, with timevar the start_date of the cabinet recorded in %td, hence I have no consecutive...

View Article

Importing and converting multiple excel files

Hi everyone, I am facing quite a significant issue with cleaning some data. As such, I would appreciate any advice or guidance that anyone can offer. I thank you in advance for your time. I have...

View Article

Variance-covariance matrix after margins and suest

Hello. I would like to to obtain the combined variance-covariance matrix from a linear regression and a probit model. However, for the latter, i would like this to refer to the marginal effect and not...

View Article


Replacing certain characters in a string

Dear all I want to substitute every second character of a string (e.g. acustomstring) with a character from another string (hello). The final string should look like this: ahuetlmltoing Any ideas how...

View Article

Generate line graphs titles using loop

Hello Statalist members, I am trying to generate a line graph for each of the countries in my dataset and add the average for the rest of the countries. However, every time try to get the title and...

View Article

Creating calendar year intervals using stsplit

I'm trying to stsplit my event data so that I get yearly intervals that can be used for logging time-varying dummy variables (like whether there is divided government in that particular year under...

View Article


regression with scfcombo

I am running some regressions starting from data coming from the Survey of Consumer Finances. The regressions are run using a (slightly modified) version of user written command scfcombo provided by...

View Article


Diff-in-diff for matched groups

Dear Statalist community, for a research project I seek to conduct a matched diff-in-diff with stata in order to identify the impact of regulation on a treatment group by comparing it to a matched...

View Article

Merging with many variables

Hello, I have one file that records all the industrial codes for a firm in separate variables. For example id indgroup1 indgroup2 ....... indgroup12 1 3111 -------3112-------------- 3113 2 4221...

View Article

Posting panel based summary stats to latex

Hi I want to post summary statistics into latex in following manner Firm var1 var2 mean sd mean sd 1 2 3 4 i used following codes: by Firm: eststo: quietly estpost summarize var1 var2, listwise...

View Article

adjust column width in Excel - putexcel

Hello everyone, I would like to increase the column width in Excel when exporting results via "putexcel". I haven't found this in the options. A little piece of code: Code: sysuse auto, clear rename...

View Article


xtreg fixed effects first difference or normal OLS reg with deltas

Hello everyone! I am doing a wage elasticity model, to find out if the increase in the minumum legal wage has an impact in the real wage of people earning around the minimun wage in t-1. I have a 6...

View Article

Obtaining labels - number and text

Hi everyone Suppose in some earlier code, someone else does this: la de clb 1"mouth" 2"Salivary gland" 3"Nasopharynx" ... N "This is label N" Now assume I am given this list of labels. If I say label...

View Article


Running error correction model on panel data (two-step)

Hi all, I am using the user written command (xtpmg) to run ecm on my panel data (N=60, T=20) to estimate the relationship between trade volume and real exchange rate. For xtpmg, it is very easy and...

View Article

Restricting y-axis with fpfit

Dear Statalisters, I've encountered a problem where I'm trying to restrict the y axis scale to show particular range that I want. For example, I would like to restrict y-axis to be in between 15 and...

View Article


Multiple observations and individuals in database for merge

Hey everyone ! I'm attempting to merge panel surveys database ( LSMS ). The problem I encounter is that in some database I have more than one observations per individual. exemple I'm studying the crop...

View Article

egrenger ecm coefficient interpretation

This is a result i got for egranger two tep error correction model estimation. are these short term coefficients? where are the long term coefficient?

View Article

Loop over variable names and macro

Hello everyone! can anyone please help me create a loop for this code? My idea was to use a macro for the new var name and ylist for the other variable, of which the second part is a non-sequential...

View Article
Browsing all 65875 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>