BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ming_ming
Calcite | Level 5

Hello,

I am trying to estimate a equation system using Full Information Maximum Likelihood. Through this process, the following error keep coming out

" WARNING: Cannot find a library containing subroutine LABOR".  Could anyobody please tell me how to fix this? Many thanks.

Below is my code:

data raw_data;

proc import datafile="C:\SAS_estimation\raw_data.xls"
out = raw_data dbms=xls replace; getnames=yes;
run;

data raw_data; set raw_data;

lshare = log(lincome/pgdp);
kshare = log(kincome/pgdp);
ly =log(rpgdp);
ll = log(labor);
lk = log(kpreal);
lh = log(H);
lyl = ly-ll;
run;

proc iml;
yl0 = 0.031018607;
kl0 = 0.051296459;
l0 = 88517.7272;
h0 = 94042.34093;
t_bar = 23.5;

proc model data = raw_data;
parms mu pi sig g_n l_n A g_k l_k GAMMA delta theta;


lshare = -log(1+mu) + log(1-pi) - ((1-sig)/sig)*g_n*t_bar*((time/t_bar)**l_n-1)/l_n+ ((1-sig)/sig)*log((rpgdp/labor)/(A*yl0))-((1-sig)/sig)*log((1-(labor(1)-labor*(1-delta))**(1/theta)*(h-labor)**(-(1-theta)/theta)/GAMMA/labor)/(1-(l0-l0*(1-delta))**(1/theta)*(h0-l0)**(-(1-theta)/theta)/GAMMA/l0));


kshare = -log(1+mu) + log(pi) - ((1-sig)/sig)*g_k*t_bar*((time/t_bar)**l_k-1)/l_k+ ((1-sig)/sig)*log((rpgdp/kpreal)/(A*yl0/kl0));

fit lshare kshare lyl / fiml;
run;

The log window reads:

...

...

101  proc model data = raw_data;
102  parms mu pi sig g_n l_n A g_k l_k GAMMA delta theta;
103
104
105  lshare = -log(1+mu) + log(1-pi) - ((1-sig)/sig)*g_n*t_bar*((time/t_bar)**l_n-1)/l_n+
105! ((1-sig)/sig)*log((rpgdp/labor)/(A*yl0))-((1-sig)/sig)*log((1-(labor(1)-labor*(1-delta))**(1/thet
105! a)*(h-labor)**(-(1-theta)/theta)/GAMMA/labor)/(1-(l0-l0*(1-delta))**(1/theta)*(h0-l0)**(-(1-theta
105! )/theta)/GAMMA/l0));
106  kshare = -log(1+mu) + log(pi) - ((1-sig)/sig)*g_k*t_bar*((time/t_bar)**l_k-1)/l_k+
106! ((1-sig)/sig)*log((rpgdp/kpreal)/(A*yl0/kl0));
107

WARNING: Cannot find a library containing subroutine LABOR.

108  fit lshare kshare lyl / fiml;
109  run;

NOTE: Execution aborted because of errors in program.
      Reenter the corrected program or enter "QUIT;" to exit procedure.

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

I think the problem is in bold below:

((1-sig)/sig)*log((rpgdp/labor)/(A*yl0))-((1-sig)/sig)*log((1-(labor(1)-labor*(1-delta))**(1/thet

It looks like it is calling a function labor with and argument of 1   labor(1)

View solution in original post

1 REPLY 1
ballardw
Super User

I think the problem is in bold below:

((1-sig)/sig)*log((rpgdp/labor)/(A*yl0))-((1-sig)/sig)*log((1-(labor(1)-labor*(1-delta))**(1/thet

It looks like it is calling a function labor with and argument of 1   labor(1)

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1712 views
  • 0 likes
  • 2 in conversation