Effective Dimension for Weighted Function Spaces