Using weighted least squares to deflate input-output tables