A semiparametric regression estimator that exploits categorical (i.e., discrete-support) kernel functions is developed for a broad class of hierarchical models including the pooled regression estimator, the fixed-effects estimator familiar from panel data, and the varying coefficient estimator, among others. Separate shrinking is allowed for each coefficient. Regressors may be continuous or discrete. The estimator is motivated as an intuitive and appealing generalization of existing methods. It is then supported by demonstrating that it can be realized as a posterior mean in the Lindley and Smith (1972) framework. As a demonstration of the flexibility of the proposed approach, the model is extended to nonparametric hierarchical regression based on B-splines.