Preheat oven to 400ºF (205℃). Lightly spray a 9×13-inch casserole pan with cooking spray. Set aside.
Wash, peel, and cut yams (sweet potatoes) into 1-inch cubes.
In a large bowl, combine half of the brown sugar (2 tablespoons), orange juice, vanilla, allspice, nutmeg, cinnamon, salt, and two tablespoons of melted butter. Mix well. Add yams to the bowl and toss to coat. Transfer the yams to the prepared casserole dish, including all the juice.
Cover the dish with aluminum foil and bake for 30 minutes.
In a small mixing bowl, combine the chopped pecans, flour, and the remaining brown sugar and melted butter. Mix using your hands until the mixture looks like a coarse crumb.
After the yams have baked for 30 minutes covered, remove from the oven, sprinkle top with the pecan flour mixture, and continue to bake uncovered for an additional 20-25 minutes or until bubbly and potatoes are fork tender.