Javascript required
Skip to content Skip to sidebar Skip to footer

Difference in Difference With Continuous Treatment

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Difference in Difference with a continuous treatment

  • Thread starter Danx
  • Start date
  • #1

Danx Asks: Difference in Difference with a continuous treatment
I am currently doing a research about the effects on labour market of Venezuelan migration in Peru. For the first step I want to get the effects of natives mean wages in the three biggest cities in terms of population due to the recent mass migration. In order to do this model, I got the yearly mean wages by city, from a large dataset of yearly labour market surveys (Cross-sectional data from 2014 to 2019) and the yearly migration share on cities' population which starts in 2017, this means that the treatment variable is 0 before 2017 and increases every year, since 2017, for each city with different intensity. Before the year 2017, where the mass migration started, there is a parallel trend in mean wages between this 3 cities which also share cultural demographics.

So I tried this code:

didregress (cities_wmean) (legshare_cities, continuous), group(cities) time(year)

cities_wmean: It is a variable which is equal to the cities' mean wage. the value is the same for each respondent within each city, due to previous coding. legshare_cities: I got legal migration share which is a proxy of the real migration, this variable goes from 0 to 1 because Stata does not accept a percentage variable, I would like to know if there is a different way to create a percentage variable.

cities: categorical variable that groups the cities' surveys respondents.

On the first try I did not set the 0 in the legal migrant share variable for the pre treatment time, so the regression p-value indicated a statistically significant effect of the treatment coefficient, this did not happen when I set the legal migrant share for the pre treatment time. The following graphs shows us this:

didregress (cities_wmean_n) (legshare_cities, continuous), group(cities) time(year) aeq

enter image description here

enter image description here

enter image description here

I would like to know if there is something wrong with my set up of this Diff. in diff. regression, what would be the meaning of the treatment coefficient if the set up is correct, and other suggestions.

Many thanks in advance.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, solveforum.

  • Harrys Kavan
  • Computer Science
  • Replies: 0

Harrys Kavan Asks: XGBoost non-linear regression
Is it possible to use XGBoost regressor to do non-linear regressions?

I know of the objectives linear and logistic.
The linear objective works very good with the gblinear booster.
This made me wonder if it is possible to use XGBoost for non-linear regressions like logarithmic or polynomial regression.

a) Is it generally possible to make polynomial regression like in CNN where XGBoost approximates the data by generating n-polynomial function?
b) If a) is generally not possible, would it be possible to declare a curve with its parameters and let XGBoost figure out the values of the parameters? (To give an example) Assume we guess that the curve can be approximated with:

$$ 10^{a\log_{k}({x})-b} $$

XGBoost would have to figure out $a$, $k$, and $b$. $x$ would be a given feature.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

  • erialdo
  • Computer Science
  • Replies: 0

erialdo Asks: How to encode high cardinality categorical data?
I have a dataset of 1600 rows and 28 columns. Only one column is partially complete with 1300 records. The rest is NaN. I did a value count of this columns and it has 84 different categories that are nominal. What is the best way to impute this column. I need to convert these in numbers impute it and then convert back. I understand that One-Hot encoding does not work in this case because of the high cardinality.

What is the best way to approach this problem?

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

  • PatoKw
  • Physics
  • Replies: 0

PatoKw Asks: car vibrating only at 80-90 mph
I have a Dodge Charger 5.7 2016 (automatic transmission)

It shakes (the car) at 80-90 mph

its not like body problem no the car actually shakes a little if i remember correctly

the steering wheel does not shake

I can also feel the vibration in the throttle and brake pedal

the vibration happens even when gas or brake is not pressed

however at 90 mph when brakes are applied the car shakes even more violently

the problem started after I repaired things in front

I am not sure if they are suspension related but i think they repaired rods or something (replacement) because my car used to make strong sound upon sudden break (now gone)

back to present problem, I tried braking strongly at low speed I didnt notice abnormalities

I tried revving in neutral no abnormalities

I balanced the wheels but that didnt fix the problem

and My front and rear tires performed alignment and caster adjustment procedure respectively

Its a mystery where the problem is; my rear tires are fresh new and the front ones slightly unevenly worn on inner side

again, steering wheel does not vibrate and brakes and throttle pedals also vibrate a little during the vibration

ps: car service due this week

appreciate any help

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

  • Luca Giulioni
  • Physics
  • Replies: 0

Luca Giulioni Asks: Tangential velocity - Spherical coordinates
In a spherical coordinates system ($r$, $\theta$, $\phi$ ), assuming an angular rotation $\omega_z$ around the z-axis, the tangential velocity of a point can be expressed as:

$$V_x = -\omega_z R \sin\theta \sin\phi $$ $$ V_y = \omega_z R \sin\theta \cos\phi$$

What happens if I have a rotation $\omega_x$ around the $x$-axis? What are the equation for the $V_y$ and $V_z$ velocity components of the point?

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

  • Selena
  • Physics
  • Replies: 0

Selena Asks: Semiconductors: Hole current
...And then suddenly It came in my book, Hole current is also there in semiconductors and I know it. But there's a little thing that's confusing me. Is this hole current temporary? Yes, according to me. Isn't it? What if all the holes generated travels up to the negative potential. What after that? As they are atoms(positively charged). They can't move outside the material and go in the circuit like electrons are doing. So, what happens to those positively charged atoms at the negative potential? Do they remains there? Forever?

There's a second little doubt too, I've read about recombination process in semiconductors. So, when the electrons are moving towards positive potential and holes towards negative. Then do the recombinations occur? Do electrons go back into the holes?

These are two doubts i'm having in the section intrinsic semiconductors of my book. Please clear these doubts. Thank you so much!

Note: I'm a school student studying in class 12. So, please answer it according to the level of grade 12 school students.


SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

  • Zanastasioquarto
  • Mathematics
  • Replies: 0

Zanastasioquarto Asks: Is $429$ the only Catalan Number sum of two consecutive integers?
$429=214+215$, so It is the sum of two consecutive integers.

Are known orher Catalan numbers greater than 429 sum of two consecutive integers or can It be ruled out?

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

  • Ian Gershon Teixeira
  • Mathematics
  • Replies: 0

Ian Gershon Teixeira Asks: Can solvable Lie groups have maximal subgroups?
cross-posted from MSE:

https://math.stackexchange.com/questions/4539025/can-solvable-lie-groups-have-maximal-subgroups

Many interesting manifolds can be expressed as $ G/H $ for $ G $ a Lie group and $ H $ a maximal closed subgroup. Examples include the projective spaces $ \mathbb{C}P^n \cong SU_n/U_{n-1} $ where $ U_{n-1} $ is maximal for $ n \geq 3 $, and $ \mathbb{R}P^n \cong SO_n/O_{n-1} $, again $ O_{n-1} $ is maximal for $ n \geq 3 $. Another example is the Poincare homology sphere $ SO_3(\mathbb{R})/A_5 $.

Solvmanifolds provide many interesting examples of manifolds, especially of torus bundles over tori (a solvmanifold is a manifold of the form $ G/H $ for $ G $ a solvable Lie group).

The examples I list above for manifolds $ G/H $, $ H $ maximal, all the have the property that $ G $ is semisimple (indeed simple).

This leads me to wonder about maximal closed subgroups $ H $ of solvable Lie groups $ G $. Do they even exist?

Let $ G $ be a connected Lie group.

If $ G $ is abelian then certainly $ G $ does not have any maximal closed subgroups. Does the same hold for $ G $ solvable?

Comment: Let $ G' $ be the commutator subgroup of $ G $. Let $$ Ab: G \to G/G' $$
be the abelianization map. If $ H $ is a maximal closed subgroup of $ G $ then we must have $$ Ab(H)=G/G' $$ because if $ Ab(H) $ was properly contained then $ Ab(H) $ would be a maximal closed subgroup of the connected abelian group $ G/G' $ which is impossible. In particular that implies that $ H $ does not contain $ G' $ (because if $ Ab(H)=G/G' $ and $ H $ contained $ G' $ that would imply that $ H $ is all of $ G $, contradicting maximality).

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

brigdennorome.blogspot.com

Source: https://solveforum.com/forums/threads/difference-in-difference-with-a-continuous-treatment.629769/