Butter a 9x13-inch baking pan.
Sprinkle pecans and coconut over bottom of pan.
Prepare cake mix as directed on box. Pour batter over nuts and coconut.
Blend cream cheese and powdered sugar together. Carefully stir in melted margarine and vanilla. Beat until smooth.
Pour over top of cake batter and lightly spread.
Bake in 325-degree oven for 40-45 minutes, or until cake tests done.
Turn cake out upside down and leave pan over cake for a few minutes to allow topping to loosen from pan.