Limit theorems for functions of marginal quantiles