spreg.dgp.make_x¶
- spreg.dgp.make_x(rng, n, mu=[0], varu=[1], cor=0, method='uniform')[source]¶
make_x: generate a matrix of k columns of x for a given distribution
Examples
>>> import numpy as np >>> from spreg import make_x >>> rng = np.random.default_rng(12345) >>> make_x(rng,5,mu=[0,1],varu=[1,4]) array([[0.78751508, 2.30580253], [1.09728308, 4.14520464], [2.76215497, 1.29373239], [2.3426149 , 4.6609906 ], [1.35484323, 6.52500165]])