Model for comparison of two subsets of the same data I am looking to perform an analysis on a subset of the data and compare it to a larger subset.
My data is primarily categorical and the dependent variable is binary.
I want to compare
$y^*= \beta X$
with
$y^{**}= \beta X$
where $y^*$ and $y^{**}$ are from two, non overlapping subsets of the same dataset and independent variables.
At this stage, due to the structure of the data I am leaning towards a random or fixed effect probit for my model.
My hypothesis would be $\beta^*-\beta^{**}$=0
the $\beta$ coefficients are the key interest here. I want to analyse the difference between the coefficients in both models.
I think one way I could do it would be to just specify identical models with a probit or a logit and just run the and then do significance tests on the coefficients to see if they are different.
I would prefer it if there was a way I could nest estimates of coefficients for both $y^*$ and $y^{**}$ within the same model. My best guess at the moment is the BVP but I am not convinced that is the best choice because typically they are used to estimate different dependent variables.
 A: You want to perform a dummy variable regression; however, the trick is with the dummy variable interacting with every known slope. This is the equivalent to run two or more separate regressions, one on sample 1, one on sample two etc.; however, you keep everything within one model.
In the case you have two samples, you have:
$y =  \beta X + D_1 + D_1 X +u$
where $\beta$ is a vector holding $1,\beta_1,...,\beta_n$.
with $D_1=1$ an indicator for belonging to a particular sample, e.g. immigrant status.
Note this is equivalent to the non-matrix form, e.g. with two covariates:
$y = \alpha + \beta_1 x_1 + \beta_2 x_2 +  D_1 + D_1 \beta_1 x_1 + D_1 \beta_2 x_2  + u$
To test your hypothesis, you can use the delta method for non-linear combinations of estimators. This is standard in some packages (nlcom for STATA), or you can calculate the test statistics yourself, which is a $\chi^2(p)$ distribution and the sandwich matrix binding the derivatives of the above expression on both sides. This is handy for more than one dummy. 
However, here with just one dummy variable, in effect, what you want to test.
($ D_1 \beta_1= 0, D_1 \beta_2 =0)$
which can be simplified to use the joint hypothesis $D_1=0, \beta_1\ne0, \beta_2\ne0$.
A: My solution to the question was to simply add in a dummy variable. It has the disadvantage that it doesn't show information about the relationships with all the coefficients. Another solution would be to add an interaction with all the variables of interests and a dummy variable distinguishing the two subsets.
