LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 11 Nov 2004 12:49:34 -0500
Reply-To:     friendly@yorku.ca
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Michael Friendly <friendly@YORKU.CA>
Organization: York University
Subject:      Re: help with Box-Cox
Content-Type: text/plain; charset=us-ascii; format=flowed

No surprise! X**0 = 1!

lambda=0 in the Box-Cox transformation means log(y), so you need to code something like

if lambda=0 then result=log(x); else result=x**lambda/lambda;

I have a boxcox macro (for proc reg) and a boxglm macro (for glm) at http://www.math.yorku.ca/SCS/sasmac/

I'm not sure why you are using proc model for OLS, except to include lambda as a parameter, but that is easily accomplished with %boxcox using REG

-Michael

gabe wrote: > Hi, > > I'm trying to estimate the equation below using a Box-Cox > transformation on the variable uc_g_M1. I'm trying to test lambda = 0 > & lambda =1. However, for values of lambda = 0 the model collapses. Is > there another way to estimate this model with a Box-Cox > transformation? > > proc model data=calculations; > var log_real_c log_real_g_M1 uc_g_M1; > parms ln_a gamma cons_elasticity lambda; > log_real_g_M1 = log_a + cons_elasticity*log_real_c - > gamma*((uc_g_M1**lambda)/lambda); > fit log_real_g_M1 /ols outest=coef_M1_MD; > run; > quit; > > Thank you, > > gabriel

-- Michael Friendly Email: friendly@yorku.ca Professor, Psychology Dept. York University Voice: 416 736-5115 x66249 Fax: 416 736-5814 4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html Toronto, ONT M3J 1P3 CANADA


Back to: Top of message | Previous page | Main SAS-L page