Preheat the oven to 350 degrees F. Prick the yams (and sweet potatoes if using a mix) several times with a fork. Place on a baking sheet and bake until tender but still slightly firm, about 60 minutes, depending on the size.
Remove and set aside until cool enough to handle. When still warm, carefully remove the skin with a small knife. Slice the yams into 3/4-inch thick rounds and place in slightly overlapping rows in a lightly buttered 9 x 13-inch baking dish. Scatter the cranberries and pecans overtop. Melt the remaining butter and drizzle over the top. Season with salt and pepper.
Combine the sugar, cinnamon and nutmeg in a small bowl. Sprinkle the mixture over the yams. (The dish could be made to this point several hours in advance and stored in the refrigerator until needed.) Bake for 20-30minutes, or until the yams are heated through and nicely glazed.