% usefile C:\monographregression\computercode\prg\bayesx\rent_location_area.txt % Create a dataset object and read the data dataset d d.infile, maxobs=5000 using C:\monographregression\computercode\data\bayesx\rent99.raw % Generate additional variables d.generate tlocation = 1*(location=3) d.generate glocation = 1*(location=2) % Set a new delimiter delimiter=; % Create a regression object remlreg r; % Define the path where to save the results r.outfile = C:\monographregression\computercode\results\bayesx\rent_loc_area; % Drop the apartments in good location d.drop if glocation=1; % Estimation r.regress rentsqm = area(psplinerw2) + tlocation + tlocation*area(psplinerw2, center), family=gaussian using d;