Quantcast
Channel: Statalist
Viewing all 65123 articles
Browse latest View live

Symbols When Substr For Year

$
0
0
Very simple, may have been answered in another post, I just wanted to get the question out before looking. I need to get my the year from my date variable. For example, with 01-01-1999, I need 1999, then destring it so I can get a number. However, I encounter an issue. Sometimes, when I run -gen year = substr(data_var, -4, 4)- , no matter what date variable, sometimes one of the numbers... its like you hit shift on the keyboard when typing it out, meaning 1994 becomes 199$, or 1991 becomes 199!, and I am not sure why. When I go back to the original date variable, sure enough the date is all numbers, so 199$ was originally 1994 in the original variable, I am not sure why this is doing this.

Load.... lets say 10mil random dates, I am sure when you substring them to get the year some of them (not a lot, maybe 5 max) will be in the weird format I mentioned.

Splitting a string variable into unique dummy variables when the string includes double digit numbers

$
0
0
Hello,
I have a string variable containing a mixture of single and double digits and I would like to use one of Stata's string functions to split them into unique dummy variables. There was a post in which Nick Cox addressed a similar issue involving single digit strings.(https://www.statalist.org/forums/for...ummy-variables). When the string involves a mixture of single digits and double digits, however, the solution provided does not produce the desired outcome. I have tried a number of string functions but the results are not what I expect. How should I go about this? I have posted an example dataset below.

Code:
clear
input float hhid str35 iterm float pid
2299 "6"         2
2383 "19"        1
 777 "14"        1
1858 "37"        2
  72 "19 22"     1
  55 "31"        2
 114 "6"         1
 495 "5 6 29"    1
 869 "19"        3
1827 "29 43"     2
 784 "5"         2
2107 "4"         1
1081 "4"         1
1001 "19"        3
2132 "19"        2
1198 "3"         2
 664 "23"        5
 537 "5 6 29"    1
 714 "23"        1
1547 "21"        1
 472 "5 8 29"    1
 452 "19 40"     1
1689 "19"        1
 568 "6"         1
 359 "19"        1
 830 "3"         3
 230 "6"         3
1581 "6 29"      1
1799 "19 44"     2
1395 "14 23 27"  7
 657 "31"        2
 776 "5 29"      2
  48 "5 6 19 29" 1
1758 "31"        2
 251 "5"         1
1915 "5 8 29"    2
1466 "31"        7
2304 "14"        2
 273 "3"         2
 774 "29"        2
1090 "6 29"      2
 366 "4"         2
  68 "19"        1
 293 "15"        4
2424 "6 8 29"    1
2441 "3 19"      2
 327 "5"         1
 976 "19"        1
 341 "5"         3
1680 "44"        9
 831 "19"        4
1435 "44"        2
2540 "5 6"       3
2198 "5 14 19"   2
 466 "3"         2
 527 "14"        2
2452 "19"        1
 963 "14"        6
1612 "22"        1
1338 "19"        3
1108 "6 7 25"    1
 724 "5 8 29 40" 2
1869 "6"         2
1411 "4"         1
  75 "6"         3
 637 "14"        4
2375 "19"        5
 254 "27"        2
1324 "3"         1
 363 "6"         1
2122 "22"        6
1118 "3 14"      3
1365 "14"        3
 629 "19 40"     1
1791 "6"         2
 433 "15"        3
end

Problem with downloading stata2mplus package

$
0
0
Hi everyone,

I was trying to download and install the stata2mplus package in order to transfer my Stata dataset into a Mplus format.

I run the code:
search stata2mplus

After clicking the web link, there is an error popping up. Does anyone know what to do with this? Or Is there other way I can do the data transformation? Thank you a lot!! (I attached a screenshot below).

Array

Esttab - keeping only some coefficients

$
0
0
Dear all, I am struggling with the following issue: I would like to put in table the results of a number of models, but I am interested in having in the table only the coefficients for some selected categories of just one variable I include in my model (in my case, categories 4 and 5 of the variable car_groups).

I think I should exploit the option -keep-, but whit the following command:

Code:
reg city i.car_groups if region == 1
estimates store m1
 esttab m1 using "",    cells("b ci_l ci_u")  replace  keep(car_groups)
 
reg city i.car_groups  i.age if region == 1
  estimates store m2
 esttab m2 using "",   cells("b ci_l ci_u")  append keep(car_groups)
I receive the error:

Code:
coefficient car_groups not found
Do you have any clue on why? In the regression table the coefficients associated to the different categories of the variable car_groups are indeed estimated and shown...

here my data

Code:
clear
input float(city car_groups) int age float region
0 1 51 3
1 1 40 3
1 1 61 3
0 1 62 3
0 3 47 3
0 3 46 3
0 1 19 3
1 3 58 3
0 1 58 3
0 5 46 3
end
label values car_groups car_groups
label def car_groups 1 "a", modify
label def car_groups 3 "c", modify
label def car_groups 5 "e", modify
label values age age_VL
label values region region

Any help would be really appreciated.

Best, Giorgio Piccitto

2SLS First Stage Fixed Effects

$
0
0
I have panel data for firms (belonging to 14 industries) over year-quarters (400 firms starting from Q2-1994 to Q4-2018). In the main model, I include firm and industry-year fixed effects. One of the Xs is endogenous and I use instrumental variable that stems from the peers of firms. In the first stage 2SLS regression, if I include firm fixed effects, the second stage regression does not show effects.

Can someone explain, what exactly is the technical issue here? In what cases, I can exclude firm-fixed effects in the first stage of 2SLS and include in 2nd stage?

Type Mismatch

$
0
0
Hello,

I need some help:

I am using the data from this https://dataverse.harvard.edu/datase...910/DVN/II2DB6

The following states have banned abortion:

"AL"
"AR"
"ID"
"KY"
"LA"
"MS"
"MO"
"OK"
"SD"
"TN"
"TX"
"WV"
"WI"

I want to create a variable ''BanYes'' = 1 for the above states.

I tried using this code:

gen BanYes = 0
replace BanYes = 1 if st == "AL"
replace BanYes = 1 if st == "AR"
replace BanYes = 1 if st == "ID"
replace BanYes = 1 if st == "KY"
replace BanYes = 1 if st == "LA"
replace BanYes = 1 if st == "MS"
replace BanYes = 1 if st == "MO"
replace BanYes = 1 if st == "OK"
replace BanYes = 1 if st == "SD"
replace BanYes = 1 if st == "TN"
replace BanYes = 1 if st == "TX"
replace BanYes = 1 if st == "WV"
replace BanYes = 1 if st == "WI"

However, stata says ''type mismatch''.

How do I solve this?

How should I test for parallel trend assumption in case of repeated cross-sectional data?

$
0
0
I have a repeated cross-sectional dataset on time-use which I am using to estimate the impact of a certain shock. My outcome of interest is time spent by individuals (men and women) on particular activity. There are two rounds of data available before the shock happened and one round of data after the shock.

I am curious to know how I can test for parallel trend assumption in this case using Stata.

Separate analysis of variables in GMM system

$
0
0
Dear STATA users
I am analysing the impact on GDP (dependent variable) of 2 independent variables related to education (Grad10 and Grad18). I consider these variables to be predetermined. I apply system GMM using the xtabond2 command. In addition, I use time dummies
The issue is that when I analyse the two independent variables (Grad10 and Grad18):
- the parameters are not significant for either of the two variables
- the constant is not significant either
- the Hansen value is higher than 3

On the other hand, if I analyse the independent variables separately, i.e. I run a panel for each variable, with respect to the Grad10 variable.
- The parameter is significant
- The constant in the model is significant
- Hansen's value is between 1-3.
And with respect to the variable Grad18 (also analysed separately), neither the parameter nor the constant is significant.

My question is, does the fact that the model calculated exclusively with variable Grad10 is correct add any relevant information?

Of course, I understand that the significance of the parameters changes when you add variables, but the problem is that adding variables messes up the model, and furthermore, the variable that was significant when analysed independently is no longer significant. In other words, can it get to the point where variables that are significant (when analysed independently) are no longer significant? Sorry if this is a very basic question, but I am a beginner.
Thank you very much for your help.

Pseudo R2 .z

$
0
0
Hi please when im asking STATA to report result in Miscrosft Word . it give me that Pseudo R2 .z . how can i solve this problem and display Pseudo R2

This is my model

asdoc xtreg lag_ROA hard_final_Exact_new csopresence1 FreezeXCSO Firm_Size_w ROA_w Leverage_w Market_book_four_w Non_pension_CFO_w STD_CFO_w Board_Independence_w BoardSize_w Gender_Diversity_w Fund_Status_w FUNDING_RATIO_w Platn_Size_w CSR_Committee SustainabilityScore_w i.year i.ff_12 , robust cluster (id) nest replace drop(i.year i.ff_12 ) dec(4) save(qqqq)


Thanks
HTML Code:
  	 		 			   			  (1) 			  (2) 		 		 			   			   lag_ROA 			   lag_RROA 		 		 			 hard_final_Exac~w 			-.0069 			-.0079 		 		 			  			(.005) 			(.0052) 		 		 			 csopresence1 			-.0015 			-.0009 		 		 			  			(.0014) 			(.002) 		 		 			 FreezeXCSO 			-.0066 			.0086 		 		 			  			(.0128) 			(.0082) 		 		 			 Firm_Size_w 			-.0023** 			-.0036** 		 		 			  			(.001) 			(.0018) 		 		 			 ROA_w 			.7493*** 			.5938*** 		 		 			  			(.0443) 			(.0676) 		 		 			 Leverage_w 			.0211*** 			.039*** 		 		 			  			(.0073) 			(.0123) 		 		 			 Market_book_fou~w 			.0003* 			.0005** 		 		 			  			(.0001) 			(.0002) 		 		 			 Non_pension_CFO_w 			.0923** 			.1489** 		 		 			  			(.0444) 			(.0591) 		 		 			 STD_CFO_w 			.0431 			.1474 		 		 			  			(.0537) 			(.0953) 		 		 			 Board_Independe~w 			0 			0 		 		 			  			(.0001) 			(.0001) 		 		 			 BoardSize_w 			0 			.0007 		 		 			  			(.0003) 			(.0005) 		 		 			 Gender_Diversit~w 			-.0001 			0 		 		 			  			(.0001) 			(.0001) 		 		 			 Fund_Status_w 			.0518** 			.0951*** 		 		 			  			(.0227) 			(.0322) 		 		 			 FUNDING_RATIO_w 			-.0006 			-.0032 		 		 			  			(.0046) 			(.0069) 		 		 			 Platn_Size_w 			.0012* 			.0017 		 		 			  			(.0007) 			(.0011) 		 		 			 CSR_Committee 			-.0004 			-.002 		 		 			  			(.0015) 			(.0025) 		 		 			 SustainabilityS~w 			0 			.0001 		 		 			  			(0) 			(.0001) 		 		 			 _cons 			.0221** 			.0349** 		 		 			  			(.0103) 			(.0159) 		 		 			 Observations 			3344 			3340 		 		 			 Pseudo R2 			.z 			.z 		 		 			Robust standard errors are in parentheses 		 		 			*** p<.01, ** p<.05, * p<.1

How to link Children's Stunting Status to Education Outcomes in Panel Data

$
0
0
Dear all,
I have a balanced panel of children observed for 3 years: 2012, 2014, and 2016. I have information on the stunting status (stunting) and whether or not the child successfully completed a school grade (grade_completed). The children are aged 0 to 14 years: range from 0-10 years in 2012 (wave 1), and 4-14 years in 2016 (wave 3). I want to establish a link between the children's stunting status in 2012, and their grade completion status in 2016. Both stunting and grade completion are binary variables with a value of 1 if the child is stunted or completed the school grade and 0 otherwise. Specifically, I want to know the distribution of grade completion in 2016 by the children's stunting status in 2012. I want to answer the following questions:

1. What proportion of children who were stunted in 2012 completed the school grade in 2016?
2. What proportion of children who were not stunted in 2012 completed the school grade in 2016?

I have tried different codes, but my results are not convincing, and I sometimes get no observation when I do a two-way tabulation: My example data is below:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long pid float(wave age stunting grade_completed age_grp)
401014 3  7 0 0 1
401014 4  9 0 0 1
401014 5 11 0 0 2
401016 5 13 0 0 2
401016 3  8 0 0 1
401016 4 11 0 0 2
401018 5 12 0 0 2
401018 3  7 0 0 1
401018 4 10 0 0 1
401020 4  8 0 0 1
401020 5 10 0 0 1
401020 3  6 0 0 1
401023 5 11 0 0 2
401023 3  6 0 0 1
401023 4  9 0 0 1
401024 4  7 0 0 1
401024 5  9 0 0 1
401024 3  4 0 0 1
401028 5 13 0 0 2
401028 4 11 0 0 2
401028 3  9 0 0 1
401030 3  5 1 0 1
401030 5 10 0 0 1
401030 4  7 0 0 1
401032 4  8 1 0 1
401032 3  5 1 0 1
401032 5 10 1 0 1
401036 5 13 0 0 2
401036 3  9 0 0 1
401036 4 11 0 0 2
401037 4  9 0 0 1
401037 3  7 0 0 1
401037 5 12 0 0 2
401038 5 12 0 0 2
401038 4  9 0 0 1
401038 3  7 0 0 1
401040 4 11 0 0 2
401040 3  8 0 0 1
401040 5 13 0 0 2
401043 5 10 0 0 1
401043 4  7 0 0 1
401043 3  5 0 0 1
401044 5 14 0 0 2
401044 4 12 0 0 2
401044 3 10 1 0 1
401045 3  5 0 0 1
401045 5 10 0 0 1
401045 4  7 0 0 1
401048 5 11 0 0 2
401048 4  8 0 0 1
401048 3  6 0 0 1
401050 4 10 0 0 1
401050 3  8 0 0 1
401050 5 12 0 0 2
401052 5 13 0 0 2
401052 4 11 0 0 2
401052 3  9 0 0 1
401056 5 14 0 0 2
401056 3  9 0 0 1
401056 4 12 0 0 2
401064 4  8 0 0 1
401064 3  6 0 0 1
401064 5 11 0 0 2
401065 4 10 0 0 1
401065 3  7 0 0 1
401065 5 12 0 0 2
401066 3  8 1 0 1
401066 4 10 1 0 1
401066 5 13 1 0 2
401068 4  8 0 0 1
401068 3  5 0 0 1
401068 5 10 0 0 1
401070 5  9 0 1 1
401070 4  6 0 1 1
401070 3  4 0 0 1
401073 5 11 0 0 2
401073 4  9 0 0 1
401073 3  7 0 0 1
401084 3  8 0 0 1
401084 5 12 0 0 2
401084 4 10 0 0 1
401091 5 14 1 0 2
401091 4 11 1 0 2
401091 3  9 1 0 1
401095 3  8 1 0 1
401095 5 13 1 0 2
401095 4 11 1 0 2
401097 5 11 0 0 2
401097 4  9 0 0 1
401097 3  6 0 0 1
401106 5 13 0 0 2
401106 4 11 0 0 2
401106 3  8 0 0 1
401111 5 13 0 0 2
401111 3  9 0 0 1
401111 4 11 0 0 2
401112 5 11 0 0 2
401112 3  6 0 0 1
401112 4  8 0 0 1
401120 5 12 0 0 2
end
label values stunting stunting_lbl
label def stunting_lbl 0 "0. Not Stunted", modify
label def stunting_lbl 1 "1. Stunted", modify
label values grade_completed grade_completed
label def grade_completed 0 "No", modify
label def grade_completed 1 "Yes", modify
label values age_grp age_grp
label def age_grp 1 "0 to 10 years", modify
label def age_grp 2 "11 to 14 years", modify

Adding 4 years before and after for each ID

$
0
0
Hello,
My data looks as below.

Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input int ID str8 Country int Year str3 Type
774 "Albania"  2006 "ARF"
760 "Albania"  2011 "ARF"
507 "Chile"    2014 "BCA"
708 "Colombia" 2019 "BCA"
650 "Colombia" 2022 "ARF"
end
For each ID I want to add 4 years before and 4 years after. All the information except for the year stays the same. An example of what I want is given below.
ID Country Year Type
774 Albania 2002 ARF
774 Albania 2003 ARF
774 Albania 2004 ARF
774 Albania 2005 ARF
774 Albania 2006 ARF
774 Albania 2007 ARF
774 Albania 2008 ARF
774 Albania 2009 ARF
774 Albania 2010 ARF
760 Albania 2007 ARF
760 Albania 2008 ARF
760 Albania 2009 ARF
760 Albania 2010 ARF
760 Albania 2011 ARF
760 Albania 2012 ARF
760 Albania 2013 ARF
760 Albania 2014 ARF
760 Albania 2015 ARF
507 Chile 2010 BCA
507 Chile 2011 BCA
507 Chile 2012 BCA
507 Chile 2013 BCA
507 Chile 2014 BCA
507 Chile 2015 BCA
507 Chile 2016 BCA
507 Chile 2017 BCA
507 Chile 2018 BCA
I would appreciate any help on how to do this. Many thanks in advance.

extremely high f statistic

$
0
0
Hello.

I'm currently using ivreghdfe command.

Below is the equation that I set for the regression.
Code:
y = a + b1x1 + b2​​​​​​c1 + b3x1*c1 + u
Code:
y = a + b1x2 + b2​​​​​​c2 + b3x2*c2 + u
(Here, x1 & x2 or c1 & c2 are variables with similar concepts but applied to different subjects.
For instance, x1 refers to the income equality index among men in a region. x2 refers to the income inequality index among women in a region.)

Since x1, x2 are endogenous, I use z1, z2 as the instrument variable for each x1 and x2.

So I used the below command.
Code:
ivreghdfe y c.c1 (c.x1 c.x1#c.c1 = c.z1 c.z1#c.c1), absorb(region year) cluster(region) first savefirst
Code:
ivreghdfe y c.c2 (c.x2 c.x2#c.c2 = c.z2 c.z2#c.c2), absorb(region year) cluster(region) first savefirst
I got the first-stage results as this.

(results for x1) Array


(results for x2) Array


F statistic in the first regression (15392.21) is too high and weird.
When I drop the c1#x1 term, the f statistic of excluded instruments in the first regression is 50.67.
(And when I drop the c2#x2 term, the f statistic in the second regression is 8.71.)

So what is the problem in this extremely high f statistic?
If this problem happens due to the c1#z1 interaction term, how can I fix it?
(Both x1 and x1#c1 interaction term are necessary in my equation.. so neither of them can be excluded.)

Random Effects NB Count Models - Alternative Specifications?

$
0
0
Dear Stata-Listers,

I have a dataset of social media posts created by individuals (i.e. authors) in the first six months of 2022, that comprises of both author-related and post-related variables.
Posts can be shared over the social network, and I examine the effect of author's gender on the number of shares each post receives.

To estimate the impact of gender (the variable "Female") on shares, I have used a random effects negative binomial count model with author's id as the panel variable but without a time variable (as the repeated observations are not measured at the same point in time). The variable "female" is significant in this model.

To show the robustness of the findings, is there any alternative empirical specification I could use?
I was thinking about Zero-Inflated count models as my data has excessive zeros, but could not find a Stata command for Zero-Inflated models in panel data contexts.

Your help is deeply appreciated!

Priyanga

Joint Hypothesis Testing

$
0
0
Hi everyone,

My objetive is to test if two joint variables are less than zero ( one sided test - dividing the p-value by two). To this end after estimating the model (panel GMM) I run two codes:

HTML Code:
 test _b[x1] + _b[x2]=0
and

HTML Code:
 test x1 x2
the results are different, what test should I use?

Adjusted Wald test not working on Stata 17

$
0
0
Hi. I am new to Stata and am doing a DHS dataset analysis (2 appended datasets from the same country) generating a new variable which i named "Period" and assigned values: 0=Pre-pandemic, 1=Pandemic.

I have renamed the variables: for example, v012 (current age, continuous variable) was renamed "age".

I have performed as svyset and proceeded to compute mean age by Period for a subpopulation of women who gave birth in the 2 years prior to the survey:

svy, subpop(if childage_mos<=24): mean age, over(Period)

Hhowever, when I performed an adjusted Wald test using:

test [age]Pre-pandemic = [age]Pandemic

Stata returned the following error message:

Equation [age] not found
r(303);

How can i make adjusted Wald test work in this situation?

Could this be due to mistakes in how i svyset the data?

THank you for your help.

Lora

Table for unit root tests

$
0
0
Hi everyone!

I'd like to create one table in Stata that summarizes the results of the following unit root tests for 12 variables (LCO2, LP, LA, LR, LN, LIND, LS, LU, LPD, LA2, LU2, LEI).
For each test, the test on the variables' first differences is also performed and should be included in the table:

//Fisher test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot fisher `var', dfuller lags(0)
}

//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot fisher D.`var', dfuller lags(0)
}

///Philips–Perron test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot fisher `var', pperron lags(0)
}

//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot fisher D.`var', pperron lags(0)
}


///Breutung test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot breitung `var' if Year>1999
}

//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot breitung D.`var' if Year>2000
}

///Levin-Lin-Chiu test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot llc `var' if Year>1999
}

//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot llc D.`var' if Year>2000
}

///Im-Pesaran-Shin test
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot ips `var'
}

//First difference
local vars LCO2 LP LA LR LN LIND LS LU LPD LA2 LU2 LEI
foreach var of local vars {
xtunitroot ips D.`var'
}

Is it possible to create a single table that summarizes the values of each test and their respective p-values in Stata?

Thank you in advance.




Interaction term omitted due to collinearity

$
0
0
Hi Stata family,

I'm currently working on my economics dissertation, trying to investigate the Belt and Road Initiative's impact on quality of economic growth (represented by total factor productivity [TFP]) on participating countries.

I am employing the empirical model designed in Ma (2022), replacing the independent variable lnpdgp with TFP in my research. Here I attach a screenshot of their methodology.


Array
As described, Treat signals whether a country is a BRI country and Post shows when this country has become a member of BRI. Now, I run this regression in my Stata with various commands, they all end up eating up my interaction term because of collinearity. The only one time that it doesn't, is when I didn't control for country and time fixed effects. I would really appreciate some insights from you brilliant minds! I attach my various attempts and their failed results. I also tried adding both of the dummies individually as controls, but that ate up my Treat variable due to collinearity instead of my interaction term.

Thanks so much for your help!! Any thoughts would be a life saver to me!
Array Array Array

Including Fixed Effects and Linear Time Trend in FMOLS and DOLS using xtcointreg

$
0
0
I am currently working on estimating a cointegration model using the xtcointreg command in Stata.

1) Is it possible to include country fixed effects, time fixed effects, and a linear time trend simultaneously while estimating FMOLS and DOLS using the xtcointreg command?
2) If so, could you please provide guidance on the syntax or an example of how to properly specify these components in the xtcointreg command?
3) Are there any specific considerations or potential issues I should be aware of when including these fixed effects and trends in my estimation?

Thank you in advance for your help!

!= 0 predicts failure perfectly;

$
0
0
Hi

im using simple probit model

where my independent variablecsopresence1 is dummy , my dependent variable hard_final_Exact_new is dummy and Moderator is dummy , which is calculated as Modriatr = csopresence1 * post_SFAS158 * PENADJ_indicator
and i have some control variable that is dummy post_SFAS158 PENADJ_indicator

the regression give me

note: Modriatr != 0 predicts failure perfectly;
Modriatr omitted and 8 obs not used.

this is my model
probit hard_final_Exact_new csopresence1 Modriatr post_SFAS158 PENADJ_indicator Firm_Size_w ROA_w Leverage_w Market_book_four_w Non_pension_CFO_w STD_CFO_w Board_Independence_w BoardSize_w Gender_Diversity_w Fund_Status_w FUNDING_RATIO_w Platn_Size_w CSR_Committee SustainabilityScore_w i.year i.ff_12 , robust cluster (id)

is there a way to solve this problem

HTML Code:
probit   hard_final_Exact_new  csopresence1 Modriatr  post_SFAS158  PENADJ_indicator Firm_Size_w   ROA_w     Leverage_w   Market_book_four_w   Non_pension_CFO_w   STD_CFO_w  Board_Independe
> nce_w BoardSize_w Gender_Diversity_w  Fund_Status_w  FUNDING_RATIO_w  Platn_Size_w     CSR_Committee  SustainabilityScore_w   i.year    i.ff_12 ,  robust cluster (id)

note: Modriatr != 0 predicts failure perfectly;
      Modriatr omitted and 8 obs not used.

note: 2005.year != 0 predicts failure perfectly;
      2005.year omitted and 165 obs not used.

note: 2006.year != 0 predicts failure perfectly;
      2006.year omitted and 13 obs not used.

Iteration 0:  Log pseudolikelihood = -358.35145  
Iteration 1:  Log pseudolikelihood = -329.04261  
Iteration 2:  Log pseudolikelihood = -326.56546  
Iteration 3:  Log pseudolikelihood = -326.52647  
Iteration 4:  Log pseudolikelihood = -326.52635  
Iteration 5:  Log pseudolikelihood = -326.52635  

Probit regression                                       Number of obs =  3,159
                                                        Wald chi2(44) =  84.81
                                                        Prob > chi2   = 0.0002
Log pseudolikelihood = -326.52635                       Pseudo R2     = 0.0888

                                            (Std. err. adjusted for 270 clusters in id)
---------------------------------------------------------------------------------------
                      |               Robust
 hard_final_Exact_new | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
         csopresence1 |   .3049664   .1256368     2.43   0.015     .0587227      .55121
             Modriatr |          0  (omitted)
         post_SFAS158 |  -.0068252    .384747    -0.02   0.986    -.7609154     .747265
     PENADJ_indicator |  -.0160293   .1407678    -0.11   0.909    -.2919292    .2598706
          Firm_Size_w |  -.1483298   .0811382    -1.83   0.068    -.3073578    .0106981
                ROA_w |   2.188747   1.405676     1.56   0.119    -.5663282    4.943822
           Leverage_w |  -.7383755   .4308076    -1.71   0.087    -1.582743    .1059919
   Market_book_four_w |  -.0002983   .0091105    -0.03   0.974    -.0181546     .017558
    Non_pension_CFO_w |  -4.841646   1.890794    -2.56   0.010    -8.547535   -1.135757
            STD_CFO_w |   1.102136   3.069188     0.36   0.720    -4.913361    7.117633
 Board_Independence_w |   .0038131    .005846     0.65   0.514    -.0076448     .015271
          BoardSize_w |  -.0198617    .026763    -0.74   0.458    -.0723163    .0325928
   Gender_Diversity_w |  -.0043376   .0068699    -0.63   0.528    -.0178023    .0091271
        Fund_Status_w |   -3.88352   2.021851    -1.92   0.055    -7.846275    .0792343
      FUNDING_RATIO_w |  -.5684102   .4264107    -1.33   0.183     -1.40416    .2673395
         Platn_Size_w |   .0334232   .0666827     0.50   0.616    -.0972726    .1641189
        CSR_Committee |   .1016902   .1371256     0.74   0.458     -.167071    .3704513
SustainabilityScore_w |   .0028631     .00359     0.80   0.425    -.0041731    .0098993
                      |
                 year |
                2005  |          0  (empty)
                2006  |          0  (empty)
                2007  |  -.1937767   .6349589    -0.31   0.760    -1.438273     1.05072
                2008  |   .3669977   .5631947     0.65   0.515    -.7368436    1.470839
                2009  |   .5487587   .4103906     1.34   0.181     -.255592    1.353109
                2010  |    .391326   .4232784     0.92   0.355    -.4382844    1.220936
                2011  |   .0877705   .4469784     0.20   0.844     -.788291     .963832
                2012  |   .4454293   .4192494     1.06   0.288    -.3762845    1.267143
                2013  |   .3479672   .4203863     0.83   0.408    -.4759747    1.171909
                2014  |   .4517313    .422942     1.07   0.285    -.3772198    1.280682
                2015  |   .4870158    .426864     1.14   0.254    -.3496222    1.323654
                2016  |   .2188491   .4397017     0.50   0.619    -.6429504    1.080649
                2017  |   .3019857   .4428455     0.68   0.495    -.5659756    1.169947
                2018  |   .6105535   .4361753     1.40   0.162    -.2443342    1.465441
                2019  |   .2607304   .4637858     0.56   0.574     -.648273    1.169734
                2020  |   .6196371   .4507377     1.37   0.169    -.2637925    1.503067
                2021  |   .2225547   .4996484     0.45   0.656    -.7567382    1.201848
                2022  |   .5439303   .5910644     0.92   0.357    -.6145346    1.702395
                      |
                ff_12 |
                   2  |   .0279744   .4129966     0.07   0.946     -.781484    .8374329
                   3  |  -.1731902   .2217855    -0.78   0.435    -.6078817    .2615013
                   4  |  -.2119661   .4017845    -0.53   0.598    -.9994492     .575517
                   5  |  -.1133531   .2490367    -0.46   0.649    -.6014561    .3747499
                   6  |   .0049323   .2409315     0.02   0.984    -.4672847    .4771493
                   7  |   .4607551   .3931313     1.17   0.241     -.309768    1.231278
                   8  |   -.257131   .2631081    -0.98   0.328    -.7728133    .2585514
                   9  |   .5244454   .2298999     2.28   0.023     .0738498    .9750409
                  10  |  -.0693265   .2593176    -0.27   0.789    -.5775795    .4389266
                  11  |   .4559202   .2359059     1.93   0.053    -.0064468    .9182872
                  12  |  -.1601826   .2445231    -0.66   0.512    -.6394389    .3190738
                      |
                _cons |  -.7197823   .7756739    -0.93   0.353    -2.240075    .8005107
---------------------------------------------------------------------------------------

Instrumented difference-in-difference (DID)

$
0
0
Hi,
I want to estimate price elasticity of gas consumption by implementing an instrumented DID. the price changes over time for different regions and are affected by authorities in each region.
Therefore I use Region as my instrument that induce variation in price of gas. But there is some concern that Region affects consumption of gas through variables other than price such as temperature (violating exclusion restriction).
Does including potential variables in the regression address exclusion restriction ? like controlling temperature.
In other words does the following 2sls regression estimate UNBIASED coefficients? (Assuming the only channel that Region might affect the consumption of gas other than price is temperature)

Code:
ivreg2 GasConsumption i.year i.ZipCode Temp (Price = i.Region i.Region#i.year), robust cluster(ZipCode)
Viewing all 65123 articles
Browse latest View live


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