BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
KaterinaELSTAT
Calcite | Level 5
Hi,
I run CALMAR macro, my code is run, and I get results, but I get less observations of the input.
For example on input I have a table with 7313 observations and my output is 7311.

Does anybody have any clue??
1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

We don't know what the CALMAR macro does.

 

A wild guess, perhaps the output excludes records that have missing values.

--
Paige Miller

View solution in original post

4 REPLIES 4
KaterinaELSTAT
Calcite | Level 5

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

 

PaigeMiller
Diamond | Level 26

We don't know what the CALMAR macro does.

 

A wild guess, perhaps the output excludes records that have missing values.

--
Paige Miller
KaterinaELSTAT
Calcite | Level 5

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