Factor analysis with heteroscedastic errors