NR full year married to dual status Resident
I was in F1 for the full year 2005. My wife was in F1 till July 2005, after which she was in H1. Our tax agent advised us to fill 1040 i.e. residents, married filing jointy for 2005. Though we received our returns, looking at the current posts I feel we filed the wrong return.
I know we were not qualified to file as residents, married filing jointly under the IRC Section 6013(h) as that would have required both of us to be resident at the end of year 2005. But did we qualified under IRC Section 6013(g) "Election to treat nonresident alien individual as resident of the United States" which only requires to be married to a 'resident or citizen' at the end of year?
Secondly, can my spouse be classified as resident at the end of 2005, since she stayed continuously for 31 days and also for more than 75% (starting from 1st of 31 days) but did not completed 183 SPT for that year (but completed this for following year)?
Lastly, should we have waited to complete 183 days on year 2006 (we filed before 15th April 2006), before filing our taxes? Please advice. Thanks in advance for your time.