Combine sweet potatoes, sugar, milk, butter, eggs, and vanilla; mix well. Spoon into a lightly greased 2-quart casserole.
Combine coconut, brown sugar, flour, 1/3 cup melted butter, and pecans, mixing well. Sprinkle over top of sweet potatoes. Bake at 375° for 45 minutes or until golden brown.