spreg.dgp.make_xb¶
- spreg.dgp.make_xb(x, beta)[source]¶
- make_xb: generate a column xb as matrix x (constant added)
times list beta (includes coefficient for constant term)
Examples
>>> import numpy as np >>> from spreg import make_x, make_xb >>> rng = np.random.default_rng(12345) >>> x = make_x(rng,5,mu=[0,1],varu=[1,4]) >>> make_xb(x,[1,2,3]) array([[ 9.49243776], [15.63018007], [10.4055071 ], [19.66820159], [23.28469141]])