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

Hi, recently i used GWNBR in SAS which developed by Alan Silva.

i have succeed generating bandwidth with Golden Search but i failed on running the GWNBR macro code

Something that i dont know here is geocod variable.

i have filled it with latitude or longitude data but it still failed.

here i attach a full error output after i run the GWNBR code with latitude or longitude data

My code:

 

%gwnbr(data=oneweek,y=park_c ,x=f1_popavg f2_commerc f5_hotel f6_attract f7_bus_den avgfee offparking, lat=Ycenter,long=Xcenter,h=166.18966,gwr=local,
method=FIXED,geocod=Xcen,out=gwnbrDC);

 

Error:

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72 
73 %gwnbr(data=oneweek,y=park_c ,x=f1_popavg f2_commerc f5_hotel f6_attract f7_bus_den avgfee offparking,
73 ! lat=Ycenter,long=Xcenter,h=166.18966,gwr=local,
74 method=FIXED,geocod=Ycen,out=gwnbrDC);
NOTE: IML Ready
ERROR: (execution) Matrix should be non-singular.

operation : INV at line 73 column 1
operands : _TEM1003

_TEM1003 8 rows 8 cols (numeric)

408.93177 2580749.2 19275.274 61.700937 575.06577 3741.6852 16467.598 3510.1102
2580749.2 1.7952E10 160092462 643409.45 2926342.5 23054509 102588556 21951181
19275.274 160092462 1986722.2 10118.257 19197.956 183153.99 706634.75 192073.75
61.700937 643409.45 10118.257 61.700937 58.92784 667.61792 1888.1874 799.33909
575.06577 2926342.5 19197.956 58.92784 2285.6846 8237.409 23054.667 7029.4371
3741.6852 23054509 183153.99 667.61792 8237.409 40985.303 148652.62 36828.717
16467.598 102588556 706634.75 1888.1874 23054.667 148652.62 688741.05 130903.84
3510.1102 21951181 192073.75 799.33909 7029.4371 36828.717 130903.84 38192.094

statement : ASSIGN at line 73 column 1
ERROR: (execution) Argument should be a scalar.

operation : J at line 73 column 1
operands : n, *LIT1123, *LIT1124
n 427 rows 1 col (numeric)

*LIT1123 1 row 1 col (numeric)

1

*LIT1124 1 row 1 col (numeric)

0

statement : ASSIGN at line 73 column 1

i guess it is because of the false input of the geocod variable. So, what data i should have to be entered in the geocod variable ?

Thanks in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

The authors of the macro are Alan Ricardo da SilvaThais Carvalho Valadares Rodrigues. Did you try to contact them on their email? 

 alansilva AT unb.br
 tatahcv AT yahoo.com.br

View solution in original post

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

The authors of the macro are Alan Ricardo da SilvaThais Carvalho Valadares Rodrigues. Did you try to contact them on their email? 

 alansilva AT unb.br
 tatahcv AT yahoo.com.br

SongJL
Calcite | Level 5

Hi, Thank you for your kind reply..
yes, i have contact Mr.Alan Silva..
We already have a discussion in email.
Thanks..

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!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 510 views
  • 0 likes
  • 2 in conversation