We don't know what the CALMAR macro does.
A wild guess, perhaps the output excludes records that have missing values.
Show us your code?
yes sure..
libname wDB090 'I:\......\DB090_16_ROT1';
libname CALM 'C:\CALMAR';
options mstored sasmstore=CALM;
libname in xlsx 'I:\....\SD19016.xlsx';
proc copy inlib=in outlib=wDB090;
run;
data wDB090.totalsDB0902016;
input var $ N mar1 mar2 mar3 mar4 mar5 mar6 mar7 mar8 mar9 mar10 mar11 mar12 mar13;
cards;
M100 0 846142 . . . . . . . . . . . .
M101 0 213819 . . . . . . . . . . . .
M102 0 234908 . . . . . . . . . . . .
.....
M109 0 364136 . . . . . . . . . . . .
M110 0 298676 . . . . . . . . . . . .
M111 0 333727 . . . . . . . . . . . .
M112 0 206663 . . . . . . . . . . . .
F205 0 421135 . . . . . . . . . . . .
F206 0 392654 . . . . . . . . . . . .
F207 0 434513 . . . . . . . . . . . .
......
F213 0 605045 . . . . . . . . . . . .
NUTSII_N 13 237113 720371 101411 267473 240914 206461 216873 1510848 80739 128899 247056
TS_N 2 3262026 906758 . . . . . . . . . . .
HS_N 4 1070362 1228561 824692 1045169 . . . . . . . . .
;
PROC SQL ;
DROP TABLE wDB090.Final_weights;
QUIT;
/********************Call to CALMAR********************************/
%CALMAR(
DATA=wDB090.Sd19016,
POIDS=INW,
IDENT=keycode,
DATAMAR=wDB090.Totalsdb0902016,
M=3,
LO=0.2,
UP=1.2,
EDITPOI=OUI,
OBSELI=OUI,
SEUIL=0.0000001,
MAXITER=100,
DATAPOI=wDB090.Final_weights,
POIDSFIN=FinWeight,
LABELPOI=FinWeight)
proc print data=wDB090.Final_weights;
run;
PROC EXPORT DATA= wDB090.Final_weights
OUTFILE= 'I:\....\DB090_16_ROT1\'
DBMS=EXCEL REPLACE;
RUN;
my keycode has 7313 observations and finally I get Final weights 7311.
Why is this?
Katerina
We don't know what the CALMAR macro does.
A wild guess, perhaps the output excludes records that have missing values.
Hi,
thanks, I ve just realised that one of my variables on my main table had NA. I never expected to have on that variable NA.
Thank you.
Katerina
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.