Legalizing unauthorized immigrants would help economy, study says