I’m using a Fuzzy Regression Discontinuity to estimate the effect of retirement on time spent on household chores. My outcome variable is the minutes spent on “Unpaid work”, my treatment variable is retirement (as defined by the individual), and my instrument is pension eligibility (Z=1 if x≥0, 0 otherwise). The variable x represents my running variable (when the individual is older than the retirement age, it takes positive values; if the individual has not reached the retirement age yet, it takes negative values).
I would expect workers to have x<0 and all retirees to have x>0, however, some eligible individuals for retirement continue to work and other individuals who are not yet eligible are already retired (due to reasons such as disability, illness, and other factors beyond my control).
When in STATA I use the rdrobust command (rdrobust unpaid_work x, fuzzy(retirement) kernel(uniform) bwselect(mserd) p(1) all), I get different results compared to when I use IV (rdbwselect unpaid_work x, fuzzy(retirement) bwselect(mserd) kernel(uniform) global left =-e(h_mserd) global right=e(h_mserd) ivreg unpaid_work x (retirement=z) if x>$left &x<$right , robust first). This happens even if I use covariates, interaction terms, or different polynomial degrees. How is this possible?
With rdrobust I get positive and significant results both for the first stage and for my outcome variable of interest. With a IV I get insignificant and with opposite sign estimates for the first stage and I cannot consider the estimate for the y.
Thank you in advance for your help
Obtain a solution for my problem
Marianna Nitti is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Sure! Below is a simple Python code for a calculator that can perform basic arithmetic operations such as addition, subtraction, multiplication, and division:
def add(x, y):
return x + y
def subtract(x, y):
return x - y
def multiply(x, y):
return x * y
def divide(x, y):
if y == 0:
return "Cannot divide by zero!"
else:
return x / y
print("Select operation:")
print("1. Add")
print("2. Subtract")
print("3. Multiply")
print("4. Divide")
while True:
choice = input("Enter choice (1/2/3/4): ")
if choice in ('1', '2', '3', '4'):
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
if choice == '1':
print("Result:", add(num1, num2))
elif choice == '2':
print("Result:", subtract(num1, num2))
elif choice == '3':
print("Result:", multiply(num1, num2))
elif choice == '4':
print("Result:", divide(num1, num2))
else:
print("Invalid Input")
again = input("Do you want to perform another calculation? (yes/no): ")
if again.lower() != 'yes':
break
You can copy this code into a Python file (e.g., calculator.py) and run it. It will ask for the operation you want to perform and the numbers involved, then provide the result.
Raja Uzair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.