javascript changes to estimate models with transformed variables