Scrub the yams or sweet potatoes thoroughly with a brush; pat dry. Prick yams with a fork. Bake in a 425 degree F oven for 40 to 60 minutes or until tender. Let stand until cool enough to handle.
Meanwhile, in a small bowl, stir together brown sugar, pecans, and nutmeg; set aside.
Peel the yams or sweet potatoes. Cut into 1/2-inch-thick slices.
In a buttered 2-quart casserole, layer half of the sliced yams, half of the sliced apples, and half of the brown sugar mixture; dot with half of the butter. Repeat the layers.
Bake in a 325 degree F oven for 35 to 40 minutes or until apple slices are tender. Serve with roast duck, game or ham. Makes 6 side-dish servings.