spreg.dgp.dgp_probit¶
- spreg.dgp.dgp_probit(u, xb)[source]¶
- dgp_probit: generates y for non-spatial probit process with given xb
and error u y is taken when linear model prediction > its mean
Examples
>>> import numpy as np >>> import libpysal >>> from spreg import make_x, dgp_probit >>> rng = np.random.default_rng(12345) >>> u = make_x(rng,25,mu=[0],varu=[1], method='normal') >>> x = make_x(rng,25,mu=[0],varu=[1]) >>> xb = make_xb(x,[1,2]) >>> dgp_probit(u,xb)[0:5,:] array([[1], [0], [0], [0], [1]])