BookmarkSubscribeRSS Feed
etty
Calcite | Level 5

Hello everyone,

I am trying to calculating Elasticities in almost ideal demand system (I follow the tutorial at Calculating Elasticities in an Almost Ideal Demand System) And I use my own resarch data as an input. But I got many errors:

ERROR: (execution) Invalid operand to operation

ERROR: (execution) Matrix has not been set to a value

Any help would greatly appreciated. I attached the log file, please have a look.

Thankyou

Regards,

Etty R

2 REPLIES 2
Reeza
Super User

fix the first error, the missing bracket and then try it from there.

568      estimate 'elasticity cl' ((gclcl - bcl*(.138))/.138 -1;

                                                               -

                                                               79

ERROR 79-322: Expecting a ).

etty
Calcite | Level 5

Hi Reeza, I have fix the first error but it still give me another error and warning like the following:

567

568     /* Linear Approximate AIDS (LA-AIDS) Model*/

569  ods html;

570

571     proc model data=aids ;

572     /*imposing homogeneity and symmetry restrictions on the parameters*/

573        gclpii = 0-gclcl-gclpl-gclbl-gclci-gclai;

574        gplpii = 0-gclpl-gplpl-gplbl-gplci-gplai;

575        gblpii = 0-gclbl-gplbl-gblbl-gblci-gblai;

576        gcipii = 0-gclci-gplci-gblci-gcici-gciai;

577        gaipii = 0-gclai-gplai-gblai-gciai-gaiai;

578        gpiipii = 0-gclpii-gplpii-gblpii-gcipii-gaipii-gpiipii;

579        acl + apl + abl + aci + aai + apii = 1;

580     /* delete last equation(pii) for adding up*/

581        wcl = acl + gclcl*lpcl + gclpl*lppl + gclbl*lpbl + gclci*lpci + gclai*lpai +

581! gclpii*lppii + bcl*lxp;

582        wpl = apl + gclpl*lpcl + gplpl*lppl + gplbl*lpbl + gplci*lpci + gplai*lpai +

582! gplpii*lppii + bpl*lxp;

583        wbl = abl + gclbl*lpcl + gplbl*lppl + gblbl*lpbl + gblci*lpci + gblai*lpai +

583! gblpii*lppii + bbl*lxp;

584        wci = aci + gclci*lpcl + gplci*lppl + gblci*lpbl + gcici*lpci + gciai*lpai +

584! gcipii*lppii + bci*lxp;

585        wai = aai + gclai*lpcl + gplai*lppl + gblai*lpbl + gciai*lpci + gaiai*lpai +

585! gaipii*lppii + bai*lxp;

586        fit wcl wpl wbl wci wai / sur outest=fin0

587                      converge = .0000001 maxit = 1000 ;

588

589        parms acl  bcl gclcl gclpl gclbl gclci gclai gclpii

590              apl  bpl       gplpl gplbl gplci gplai gplpii

591              abl  bbl             gblbl gblci gblai gblpii

592              aci  bci                   gcici gciai gcipii

593              aai  bai                         gaiai gaipii

594              apii                                   gpiipii;

595      estimate 'elasticity cl' ((gclcl - (bcl*.138))/.138) -1;

596

597     run;

WARNING: The 'parameter' gclpii is assigned a value by the model program. This parameter will

         not be estimated.

WARNING: The 'parameter' gplpii is assigned a value by the model program. This parameter will

         not be estimated.

WARNING: The 'parameter' gblpii is assigned a value by the model program. This parameter will

         not be estimated.

WARNING: The 'parameter' gcipii is assigned a value by the model program. This parameter will

         not be estimated.

WARNING: The 'parameter' gaipii is assigned a value by the model program. This parameter will

         not be estimated.

ERROR: At OLS Iteration 0 there are 0 nonmissing observations available. At least 5 are needed

       to compute the next iteration.

NOTE: The data set WORK.FIN0 has 0 observations and 29 variables.

598     quit ;

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 2 replies
  • 2021 views
  • 0 likes
  • 2 in conversation