I have an F1 visa and my spouse is a permanent resident with no income. My employer has deducted FICA taxes and I would like to get a refund for that as well. What will be my best options for filing? I prefer to file joint.
Yes, you can file as Married Filing Jointly if you guys want. Either you are a resident alien, and so you can file jointly as both of you are resident aliens, or you are a nonresident alien and can use Nonresident Spouse Treated as Resident to treat you as a resident alien for the whole year and then file jointly.
If you were a resident alien on F1, the FICA tax would have been deducted correctly. If you were a nonresident on F1, you should have been exempt from FICA tax (this is true even if you used Nonresident Spouse Treated as Resident to file jointly with your spouse). You are exempt from the Substantial Presence Test for the first 5 calendar years on F1, so assuming you hadn't been to the US on F or J status before, if you came on F1 in 2012 or before, you would be a resident alien for all of 2017, but if you came on F1 in 2013 or after, you would be a nonresident alien for all of 2017. If you were a nonresident alien and they deducted FICA in error, you should first ask the employer to have it refunded. If the employer can't, you can file Forms 843 and 8316 to IRS to ask for a refund; note that this is independent from your income tax return, and may take years to receive a response.