Drawing upon my experience as a police officer and a lawyer, I can say that you may have a legal right to refuse to answer questions, not perform field sobriety tests, and walk away from the police. Police officers must have sufficient "facts and circumstances" to justify ordering someone to remain in place, detain someone, or effect an arrest. Evidence obtained as a result of an unlawful detention, search, interrogation, or arrest can be suppressed in court.
However, the police usually don't react well when someone disobeys their orders, lawful or not. Disobedience may very well result in an arrest and criminal charges. Whether or not the charges will "stick" is another story, based on 4th Amendment / Constitutional law principles.
Brian E. Simoneau, Esq.
550 Cochituate Rd. # 25
Framingham, MA 01701