# Can "non-parametric" tests be achieved with generalized linear models?

I recently read @Kodiologist's answer to a post here looking for clarification on the relation between GLMs and non-parametric tests. His answer is along the lines of "the approach is not non-parametric because the model is fully specified by its parameters" (which are finite in number and don't change with the sample size).

Is it not possible to use a model to non-parametrically test a weak null hypothesis?

My understanding of the rationale for conducting parametric and semi-parametric inference is that the underlying probability model arises from a family of distributions that can be indexed by $\theta$, a parameter, and if two random variables are generated according to different values of $\theta$, we know they have a different distribution and can reject the strong null hypothesis (that the probability distributions differ).

On the other hand, I may be interested in a weak null hypothesis (that a statistic of their densities differs). In this case, whatever value is estimated by a GLM sort of defines the thing I'm interested in. For instance, if I have data on two groups (call them $u$ and $v$), and I stack those data using a binary indicator, I believe can apply ordinary least squares with a binary predictor and claim I am interested in testing the null hypothesis:

$$\mathcal{H}_0: \int_{-\infty}^{\infty} u f_u \ne \int_{-\infty}^{\infty} v f_v$$

I know that the test 1) may not be consistent (if the conditions of the central limit theorem are not met), 2) the null may be true when $f_u \ne f_v$, and 3) may be difficult to actually write down the null hypothesis depending on the complexity of the model. However, rejecting the null may be of significant interest. I claim that in this setting least squares is being used non-parametrically, despite the usual development in which the LS estimates are characterized in terms of parameters.