/************************************************************************* A simple SAS program to divide MainSG&A into investment and consumption portions. Please cite Management Science article "Should Intangible Investments Be Reported Separately or Commingled with Operating Expenses? New Evidence" if you use this method. This program imposes less stringent sample selection restrictions than the original article. (The original paper requires several lead and lag restrictions to conduct robustness tests.) *************************************************************************/; /* Data preparation steps: Missing values of R&D and Advertising are replaced by zeroes. MainSG&A is calculated by subtracting R&D and Advertising expenses from SG&A. All finance firms and firms negative values of MainSG&A are dropped. All variables are deflated by average total assets. Industries are identified with two-digit SIC codes. Alternatively, you may use Fama and French 48 industry classification. Loss firms are identified by negative IB. Sales-decline firms are identified by firms that have a decline in unscaled revenues compared to last year. *************************************************************************/; proc sort data = CompustatAnnualFile ;by gvkey fyear; run; data Base_MainSGA; set CompustatAnnualFile ; if sic = . then sic = sich; lagfyear = lag(fyear); laggvkey = lag(gvkey); lagat = lag(at); lagsale = lag(Sale); if xsga = . then xsga = xagt; if xad =. then xad = 0; if xrd =. then xrd = 0; loss = 0; if ib ne . and ib lt 0 then loss = 1; sales_decr = 0; if gvkey = laggvkey and fyear = lagfyear +1 then do; av_assets = (at + lagat)/2; ad_at = xad / av_assets; sales_at = sale/av_assets; rnd_at = xrd/ av_assets; sga_at = xsga/av_assets; mainsga_at = (xsga - xrd -xad)/av_assets; if sale ne . and lagsale ne . and sale lt lagsale then sales_decr = 1; end; industry2=floor(sic/100); if av_assets ne . and sic ne . and (sic gt 6999 or sic le 5999) and sales_decr ne . and loss ne . andsales_at ne . and mainsga_at gt 0 then output; keep gvkey mainsga_at fyear sga_at sic av_assets ad_at sales_at rnd_at mainsga_at sales_decr loss industry2 ;run; * All regression variables are winsorized at 1% and 99% levels by year on a replacement basis; proc sort data = Base_MainSGA; by fyear; run; ods listing close; ods html close; proc univariate data = Base_MainSGA; by fyear; var mainsga_at sga_at av_assets ad_at sales_at rnd_at ; output out = udata p99 = qmainsga_at qsga_at qav_assets qad_at qsales_at qrnd_at p1= pmainsga_at psga_at pav_assets pad_at psales_at prnd_at ; run; quit; data Base_MainSGA; merge udata Base_MainSGA; by fyear; vmainsga_at = mainsga_at ; vsga_at = sga_at ; vav_assets = av_assets ; vad_at = ad_at ; vsales_at = sales_at ; vrnd_at = rnd_at ; if mainsga_at ge qmainsga_at then vmainsga_at = qmainsga_at ; if sga_at ge qsga_at then vsga_at = qsga_at ; if av_assets ge qav_assets then vav_assets = qav_assets ; if ad_at ge qad_at then vad_at = qad_at ; if sales_at ge qsales_at then vsales_at = qsales_at ; if rnd_at ge qrnd_at then vrnd_at = qrnd_at ; if mainsga_at ne . and mainsga_at le pmainsga_at then vmainsga_at = pmainsga_at ; if sga_at ne . and sga_at le psga_at then vsga_at = psga_at ; if av_assets ne . and av_assets le pav_assets then vav_assets = pav_assets ; if ad_at ne . and ad_at le pad_at then vad_at = pad_at ; if sales_at ne . and sales_at le psales_at then vsales_at = psales_at ; if rnd_at ne . and rnd_at le prnd_at then vrnd_at = prnd_at ; run; *Define industry, select years; data sample2; set Base_MainSGA; SIC2 =industry2; if fyear ge 1960 and fyear le 2014 then output ;run; *Drop industry-years with less than ten observations; proc sort data = sample2 ; by SIC2 fyear ; run; ods html close; ods listing close; proc univariate data = sample2 ; by SIC2 fyear ; var mainsga_at; OUTPUT OUT=obs_ind_yr n=n ; run;quit; data obs_ind_yr_valid ; set obs_ind_yr; if n ge 10 then valid_10 = 1; if valid_10 = 1 and SIC2 ne . then output; run; data sample3; merge sample2 obs_ind_yr_valid;by SIC2 fyear ; if valid_10 = 1 then output; run; *Estimate regressions by industry-year. Dependent variable is MainSG&A. Key independent variable is current revenues. Both deflated by average total assets. Two dummies are also included in regression. One for loss. The other for sales decline.; ods html close; ods listing close; proc reg data = sample3 outest = sample3_int; by sic2 fyear ; model vmainsga_at = vsales_at sales_decr loss ; reweight rstudent.<-3 or rstudent.>3; ; run;quit; Data coefficients_by_ind_year; set sample3_int; beta_rev = vsales_at ; beta_rev_decrease= sales_decr; beta_ni_loss = loss; intercept = intercept; keep beta_rev SIC2 beta_rev beta_rev_decrease beta_ni_loss intercept fyear; run; *MainSG&A is divided into Consumption and Investment portions. Consumption portion is associated with current revenues. Investment portion is obtained by subtracting consumption portion from MainSG&A; data sample322; merge sample3 coefficients_by_ind_year ; by SIC2 fyear ; consumption_mainsga_at =beta_rev *vsales_at ; investment_mainsga_at = vmainsga_at - consumption_mainsga_at; if sic2 ne . and fyear ge 1960 and fyear lt 2014 then output; run; proc sort data = sample322; by fyear; run; * All nonmissing values are winsorized at 1% and 99% levels by year on a replacement basis; ods listing close; ods html close; proc univariate data = sample322; by fyear; var consumption_mainsga_at investment_mainsga_at ; output out = udata p99 = qconsumption_mainsga_at qinvestment_mainsga_at p1= pconsumption_mainsga_at pinvestment_mainsga_at ; run; data Sample_with_Inv_Cons; merge udata sample322; by fyear; vconsumption_mainsga_at = consumption_mainsga_at ; vinvestment_mainsga_at = investment_mainsga_at ; if consumption_mainsga_at ge qconsumption_mainsga_at then vconsumption_mainsga_at = qconsumption_mainsga_at ; if investment_mainsga_at ge qinvestment_mainsga_at then vinvestment_mainsga_at = qinvestment_mainsga_at ; if consumption_mainsga_at ne . and consumption_mainsga_at le pconsumption_mainsga_at then vconsumption_mainsga_at = pconsumption_mainsga_at ; if investment_mainsga_at ne . and investment_mainsga_at le pinvestment_mainsga_at then vinvestment_mainsga_at = pinvestment_mainsga_at ; run; * Standardized values are obtained by industry and year; proc sort data = Sample_with_Inv_Cons ; by sic2 fyear; PROC STANDARD DATA=Sample_with_Inv_Cons MEAN=0 STD=1 OUT=zvar; by sic2 fyear; VAR vconsumption_mainsga_at vinvestment_mainsga_at ; RUN; data zvar2; set zvar; zvconsumption_mainsga_at =vconsumption_mainsga_at; zvinvestment_mainsga_at = vinvestment_mainsga_at; keep gvkey fyear zvconsumption_mainsga_at zvinvestment_mainsga_at ; run; proc sort data = zvar2; by gvkey fyear; proc sort data = Sample_with_Inv_Cons ; by gvkey fyear; data Sample_with_Inv_Cons; merge zvar2 Sample_with_Inv_Cons ; by gvkey fyear; if vinvestment_mainsga_at ne . then output; run; * Percentile ranks are obtained by industry and year; proc sort data = Sample_with_Inv_Cons ; by fyear; proc rank data = Sample_with_Inv_Cons out=Sample_with_Inv_Cons groups = 100; by fyear; VAR vconsumption_mainsga_at vinvestment_mainsga_at ; RANKS vconsumption_mainsga_at_r100 vinvestment_mainsga_at_r100 ; run; data Final_sample_with_Inv_Cons; set Sample_with_Inv_Cons ; rename vsga_at = SGA vmainsga_at = MainSGA vad_at = Advertising vrnd_at = RD vconsumption_mainsga_at = ConsumptionMainSGA vinvestment_mainsga_at = InvestmentMainSGA intercept = IndustryFixedInvestment vconsumption_mainsga_at_r100 = PercentileConsumptionMainSGA vinvestment_mainsga_at_r100 = PercentileInvestmentMainSGA zvconsumption_mainsga_at = StandardizedConsumptionMainSGA zvinvestment_mainsga_at = StandardizedInvestmentMainSGA ; PercentileConsumptionMainSGA = PercentileConsumptionMainSGA +1; PercentileInvestmentMainSGA = PercentileInvestmentMainSGA +1; run; ods listing; Proc summary print N NMISS MEAN STD Q1 MEDIAN Q3 nolabels data = Final_sample_with_Inv_Cons ; Title "Descriptive Statistics of SG&A Components"; Var SGA MainSGA Advertising RD ConsumptionMainSGA InvestmentMainSGA IndustryFixedInvestment StandardizedConsumptionMainSGA StandardizedInvestmentMainSGA PercentileConsumptionMainSGA PercentileInvestmentMainSGA ;run;