Help using Base SAS procedures

smoothing map

New Contributor
Posts: 2

smoothing map


I should create a map with smoothing mortality rate for italian areas with the neighbor Matrix (for each area (row) the Matrix considers more areas (colomns)) .


I haven't PROC IML and I think I could't use PROC GLIMMIX.


I'm trying to study PROC MCMC form an example by SAS that considers the neighbor Matrix, but It doesn't work .


Could you help me?


Alessandra Rossi

Posts: 2,370

Re: smoothing map

Posted in reply to ale_rossi
Moved to "SAS procedures"
Super User
Posts: 13,583

Re: smoothing map

Posted in reply to ale_rossi

Doesn't work is awful vague.

Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.

No output? Post any log in a code box.

Unexpected output? Provide input data in the form of a dataset, the actual results and the expected results. Data should be in the form of a data step. Instructions here: will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

Posts: 4,245

Re: smoothing map

Posted in reply to ale_rossi

Try using radial smoothing functions (TYPT=RSMOOTH) as in this GLIMMIX example:

New Contributor
Posts: 2

Re: smoothing map

Posted in reply to ale_rossi


I solved using SAS Studio that has neighbour option in PROC MCMC.

I'd need to weight the single area (cod_pro) and the neighbors (cod_pro_adj) with their Observedevents .

How could I do?


follow my sintax without the weight


ods select none;
proc mcmc data=step1 seed=615926 nbi=10000 nmc=50000 thin =10
   plots=none outpost=/*OUT.*/step1post;
   parms tau_b 0.5 tau_h 0.2 provar 0.5;
   parms alpha 0;
   prior tau: ~ gamma(0.5, is=0.0005);
   prior alpha ~ general(0);
   prior provar ~ gamma(0.001, is=0.001);
   random h ~ n(0, prec=tau_h/**poptime*/) s=cod_pro; 
   random b ~ normalcar(neighbors=cod_pro_ad, num=num, prec=tau_b*num/*/poptime ObservedEvents*/) s=cod_pro;
   mu=alpha + b + h;
   model stdrate ~ normal(mu, sd=provar);


I've attached the db with few rows.


Many thanks


Ask a Question
Discussion stats
  • 4 replies
  • 4 in conversation