Quantcast
Channel: Statalist
Browsing all 73262 articles
Browse latest View live

not estimable margins after reghdfe

Dear Statalisters, I have a problem in computing the margins of a linear fixed effects regression that I have not managed to solve by looking at previous posts - I apologies in case I overlooked...

View Article


Psmatch2 for prepensity score matching with specific categorical variables

Hello Statalist community. I am currently trying to do a propensity score matching with the psmatch2 package. I have a treatment variable (regulated firm --> 'regualted') and want to find a...

View Article


Using bysort egen

Hi everyone, I have two questions: 1/ I am using the command Code: bysort $id: egen . The result I got containing the missing value. That is because the variable used for the [egen] has missing value....

View Article

Major problem importing Excel file

Dear all, I have a major problem importing data from an excel sheet into Stata - specifically I get the r(198) error, which is not particularly helpful. The following command is being used: Code:...

View Article

Generating MAR and MNAR datasets

Hi, I would like to generate from a full dataset with an outcome variable y and a single predictor x with 2 levels (0/1) other datasets with different proportions and patterns of missing data. My aim...

View Article


different plotopts with combomarginsplot

I am carrying the following regressions: reg sav_finimp`wave' ib3.group##i.year savimp`wave' margins 1.group##year, at (group=(1)) saving(m1, replace) margins 2.group##year, at (group=(2)) saving(m2,...

View Article

Tabulating distinct counts of an ID by group

I have the data in dataex below, I just want a table that is number of unique cID by group so like this (given the dataex below): Group 1 Group 2 Group 3 Group 4 distinct cID 2 1 2 1 There are many...

View Article

Arellano-Bond Estimator for AR(2) model

Hi All, My dataset resembles the following: Code: * Example generated by -dataex-. To install: ssc install dataex clear input float(individual time y x lagy lag2y) 1 1999 23 3 . . 1 2000 2 2 23 . 1...

View Article


Number of ID Variable in Panel Data

Hi, I have a panel data (large n and small T) with -id- as the panel variable and -year- as the time variable. The year variable ranges from 2000-2003 and id captures the number of firms. The id...

View Article


Help with Using Lincom Command on Interaction Term

Dear all, I am using Stata 16, on mac. I used the following command to estimate my regression: regress wage educ urban c.educ#urban. But I wanted to use the lincom command to see what would education...

View Article

t statistic (p-value) of lower order coefficients in models with interaction...

Hi, In the following system GMM model based on a panel dataset of 1696 firms across 16 years, I am interested in calculating the ultimate coefficient for lagged cash holdings (CashHoldings1) and...

View Article

Cell Extraction and reading data

Hello, I have an extraction issue in Stata. I want to extract a specific cell from Stata data based on the value of another variable. Conceptually, I need for Stata to read down a column of data, and...

View Article

R squared equals 1 when running spatial fixed effects

Hello everyone, I´ve been asked to show that, when you run your outcome variable against your geographical fixed effects, the adjusted R squared equals 1. The idea behind this is that, as your database...

View Article


Bankcountryyear fixed effects

Dear all, could you please kindly confirm, that the following code would mean "bankcountryyear" fixed effects for panel dataset? Generate BankCountry=Bank*Country xtset BankCountry Year xtreg depvar...

View Article

verifying a condition for three consecutive years in panel data

Hello everyone, this is my first post here and I'm relatively new to Stata so I was hoping to get some help on an issue I am stuck with. I have a large dataset (panel data) of different corporations...

View Article


Time Series merge with ID classification

Hello, I am currently trying to connect time series data (with long/lat attributes for each observation) to a different dataset that contains district centroids. I want to determine which grid points...

View Article

Help Creating New Variable Equal to the Square of the Residuals

Dear all, I am using Stata 16, on mac. I want to create a new variable called resid_sq that is equal to the square of the residuals. I used the following command: predict resid_sq, residuals. Would...

View Article


change spanish letters to english

I have a data set that lists Salvadorian towns, the data has been imputed in Spanish so there are Spanish letters that STATA does not know how to read is there a command to translate the words to Spanish

View Article

Image may be NSFW.
Clik here to view.

Mahapick with foreach loop

Dear Statalists, I want to find several (5) company matches based on financial data, always for a given year and a given industry. The industry is expressed as a code ranging from 100 to 9997 in...

View Article

How to construct a 'reputation' variable?

Hi, I have a dataset on compliance actions and penalties for violations of an environmental statute for individual plants in an EPA compliance database for the Clean Air Act. I have the start and end...

View Article
Browsing all 73262 articles
Browse latest View live