BookmarkSubscribeRSS Feed
min6275
Calcite | Level 5

 

 

I am trying to calculate the implied cost of capital (k_ct in the model below) of four models following Hail and Leuz (2006, 2009) with SAS using IBES dataset.

I have tried using 'proc model' but SAS keeps saying that I need to define the parameters.

So I have tried generating 10000 rates by using do i=1 to 10000 and setting rate = t/10000 and plugging the rates into the model to come up with 10000 prices (left hand variable).

But this seems to take too long and I still cannot get the result with required precision.

Can anyone please recommend me better way to solve this problem?

Thank you in advance.

 

 

cl.jpg

3 REPLIES 3
Rick_SAS
SAS Super FREQ

Please post your PROC MODEL code so we can see how you've implemented the model.

min6275
Calcite | Level 5
data ae_parm; set ae;
	do t=1 to 1000;
	prc=prc;
	bkvlps=bkvlps;
	medest=medest;
	r_cl=rand('Uniform');
	medest2=medest2; bkv1=bkv1; medest3=medest3; bkv2=bkv2;medest4=medest4; bkv3=bkv3;medest5=medest5; bkv4=bkv4;
	growth=growth;
	output;
	end;
run;

data goal; set ae;
	prc=prc;
	bkvlps=bkvlps;
	medest=medest;
	medest2=medest2; bkv1=bkv1;	medest3=medest3; bkv2=bkv2;medest4=medest4; bkv3=bkv3;medest5=medest5; bkv4=bkv4;
	growth=growth;
run;


proc model data = ae_parm noprint outmodel = r_cl;
	endogenous r_cl;
	prc = bkvlps + (medest - bkvlps*r_cl)/(1+r_cl) + (medest2 - bkv1*r_cl)/(1+r_cl)**2 + (medest3 - bkv2*r_cl)/(1+r_cl)**3 +(medest4 - bkv3*r_cl)/(1+r_cl)**4 + (medest5 - bkv4*r_cl)/(1+r_cl)**5
			+ ((medest5 - bkv4*r_cl) + (1 + growth))/((r_cl - growth) * ((1+r_cl)**5));
	fit prc/ outest = prcest;
	solve r_cl  /estdata = prcest data = goal;
run;

This is the code I have used trying to estimate r_cl.

I am new to using SAS so I just tried to follow the sample code from online but it doesn't seem to be working as intended.

sassssssssss
Calcite | Level 5

I have got the same problem. Did you manage to solve it? 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 4107 views
  • 0 likes
  • 3 in conversation