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

Reduced form regression

Dear all, I have the following problem. I am able to estimate the following two stage regression equation: Yi,T+1 - Yi,T = α + λ (Y*i,T+1 - Yi,T) + εi,T + 1 where Y*i,T+1 = ˆβXi,T by obtaining Y*i,T+1...

View Article


Multilevel regressions and comparing the groups in these regressions

Dear reader, Currently I am trying to analyse from the data below what industry (sibcode is industry code) gives the most “success” to an individual. This success is based on the ranking of an...

View Article


Generating variable that assigns a number for each duplicating sets of...

Dear all, I'm trying to generate a variable which will group a subset of observations within a group. For example, my dataset looks something like this: ID var1 var2 1 a 1 1 a 2 1 b 1 1 b 2 2 a 3 2 a 4...

View Article

Computing median odds ratio after meglm (or any other mixed command)

Hello, Could anyone provide some advice about how to compute a median odds ratio after running meglm or any other mixed command? I found a package called xtmrho that is designed to do this, but it...

View Article

Count models versus fractional response models

A student asked me the following Q that I only know part of the answer for: for my project, i am running a model that looks at crime in a given tract. So far i have been running these models with tract...

View Article


Creating a unique value after aggregating data

Hello Stata users, My goal is to run xtreg on monthly data. 1. The original data set is at the hourly level. In this set, there are four columns for time: year month day hour. I have created a...

View Article

2spls CHECK IDENTIFICATION (i.e. Exclusion criteria)

"Dear Statalist Users I am estimating a set of simultaneous equations as below: Y=a0 + a1E+ a2X + e E= b0 + b1Y+ b2X+v Where E is a dichotomous variable and Y is a continuous variable. X is a set of...

View Article

How to make Graph for Seasonality Data

Dear Statlist, ​I am trying to make figure for seasonality data. I have households cross-section data over 5 quarters of two years, e.g. two quarter of 2012 and three quarter of 2013 ( each quarter...

View Article


Replacing dates manually (

Hello, Wondering if anyone could help me. I've got an int variable "datesxonset" in format %td. The dates look like "09jan2015". However, some observations are missing that information so "datesxonset"...

View Article


Quantile Regression for Panel Data

Hi, I am trying to estimate a quantile regression with panel data following Ivan A Canay (2011) A simple approach to quantile regression for panel data, Econometrics Journal, volume 14, pp. 368–386....

View Article

Rolling and xtreg return only missing values for beta estimate

Dear all, I am new to Stata so apologies in advance if my questions are basic. I have been working on this problem for hours and can't find a solution so any help would be welcome. I have a panel data...

View Article

Is there an option to use all defined constraints in a regression?

I am trying to run a regression using sureg, and I have defined my constraints such that the program is flexible to changes in the variables I wish to use and there are no constraints that I do not...

View Article

label values from a "dictionnary"

Hi Statalist I use Stata 14 on Mac (and more frequently Stata in batch mode from shell) I have two datasets (examples below) THE FIRST ONE: ID CODE1 CODE2 1 10 11 2 12 12 3 13 14 and the SECOND ONE:...

View Article


perfect prediction in -heckman, select()-

Do heckman / heckprob attempt to identify perfect prediction in the selection equation? From the output, it does not seem like they do; logit or probit output would have said something like "blah...

View Article

Gini decomposition grouped data

Dear Statalists, I'm new to the forum. I'm using Stata 13 to estimate Gini coefficients for grouped data. My data is organized as follows: I have the number of farms (varname "farms") and the number of...

View Article


Problems with parmest using loop

Hi. I am trying to run models using loops, and I want to store estimates and p-values in stata so that I can select which model I want to keep/discard. I did some research on statalist, and I found...

View Article

"no observations" in unpaired t-test from two datasets

Hello, I have a very urgent problem with my data analysis. I am doing a comparative analysis for my studies. I want to compare one question from the Eurobarometer over time (2007 and 2015) for the...

View Article


reg3 - r(2001) Insufficient observations error

Dear Statalists, I try to run a system of two simultaneous equations imposed on Monte Carlo generated data using the 3sls method. The problem is, while I have set the number of observations at...

View Article

Save matrix with Matsave: syntax error

Hi, I know this is very simple, but I'm experiencing difficulties to save matrices with "matsave" (ssc install matsave). Where am I getting it wrong? Thanks! Code: sysuse auto.dta, clear mkmat price...

View Article

metan - a replacement for dp(#) - how to set the number of decimal places in...

Hello all, I am using metan in Stata/SE 14.1. Previously, there was an option dp(#) that allowed the user to specify the number of decimal places displayed for the effect size in the forest plot. This...

View Article
Browsing all 65033 articles
Browse latest View live


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