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

Diff-In-Diff with the Diff-command in STATA

Hi, I have been trying to do difference in difference and I have for example this code: xtreg ap treated post11 Post11*treated lnk lnl where lnk and lnl are covariates. Here I got a positive and...

View Article


convert dates into only month format

Hello. How could I convert 07sep2015 into September only? Thanks

View Article


Automatically check whether a program is in memory

Dear Community, I was wondering if there is a way to automatically check whether a specific program is loaded into memory. I know that there is the command program list but that just allows me to check...

View Article

Running correlations with continuous and dichotomous variables

I need to run correlations between 20-30 variables we created from federal datasets (includes BRFSS and CDC wonder). We created variables in stata based on a z-score we calculated for each variable at...

View Article

Add interaction but get the same main effects?

Dear all, I have one regression of the format (1) - reg y x FE- and one of the format (2) - reg y x FE x*z - where the latter contains no z itself as it is absorbed the the set of fixed effects FE. If...

View Article


Fama and MacBeth and two way clustering

Hi There I have large panel dataset (Large N and Large T). My data suffers from time series dependence and cross section dependence. As far As I know Fama and MacBeth is designed to address the cross...

View Article

Creating unique household ID using PSU and sub-PSU household number

Hi all, I've been searching around for a while without finding an answer to this, so I would be really grateful for any help! I am analysing a nation-wide household survey which contains about 30,000...

View Article

Change username?

I'm about to post a question in the general forum, but lest I have Nick Cox berate me again for not using my real name, is there any way to change the username of my account? I can't find anything like...

View Article


Forecast and add factors not working as expected

I've struck out asking here about Stata's -forecast- function in the past, but I'll try again with a different question. -forecast- solves a system of equations for the endogenous variables, using...

View Article


Effect of variables six months before dying - Cox Regression

I don't know if I'm allowed to replicate my question here, but in this forum I usually always get a good answer! Originally posted here: http://stats.stackexchange.com/quest...cox-regression I have a...

View Article

How to decompose ranges within specific observations and assign specific...

Hi everybody, i have a quick questions concerning the following set-up: I have a variable Size, composed of 14 different types of observations, all displayed as ranges (e.g. 10m <, 50m - 100m,...

View Article

Cleaning a variable using the generate command with the 'real' function

Hi all I currently have a variable 'patientheight' (storage type string) in my dataset that describes heights in cm for 25,000 plus patients. While the majority of these measurements are recorded...

View Article

Centile code to remove the outlayers

Dear all I used this code to remove the outlayers and it works well. Just I want to know if this code represent winsorizing the data or not. centile(variable name ), centile(1, 99) drop if (variable...

View Article


The single equation Error Correction Model

Could someone explain how to do a single equation error correction model in STATA? I have quarterly data (76 observations) on my two variables, Y= cash flow to the state from the petroleum sector...

View Article

Why Doesn't A*B == B*A?

I am working on some code that calculates percentiles and am running into issues in Mata. Digging into it, I found that the mod() operator wasn't acting as expected in either Mata or Stata. Going one...

View Article


Hickman two step for simultaneous equations.

Hi all, I want to use a Heckman's two step procedure to estimate a demand system: Firs step: to identify factors determining decisions to buy organic or non-organic, dependent variable: probability=1...

View Article

Power analysis by interaction

I have to conduct a power analysis on interaction effect in STATA 13. I want to know the power. I already have the sample size of the mortality and an estimated effect size. I will perform a cox...

View Article


Round then convert to string: losing the rounding

Hello, I am using the following code to round a numeric variable, then convert to string. The round code works, but then when I convert to string it returns the un-rounded number as a string. replace...

View Article

Renaming variables to match original labels using a loop

Hi everyone! I have a dataset with information on the type of videos students watched on an online platform. Variable video was originally in long format and I reshaped it to be wide using the...

View Article

Recode string variable to numeric

Dear Statalisters, Below I display the first few observations of my large dataset. My variable when is a string. I want to recode it because I want to conduct t test for variable mtbv lgta based on the...

View Article
Browsing all 72762 articles
Browse latest View live


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