<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help using the SAS CALMAR macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896422#M354204</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416124"&gt;@Gick&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;I just applied the example given in the macro documentation. I don't know why this isn't working for me.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I asked to see the log, I gave specific details on what I want to see and how to present it. Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 29 Sep 2023 14:13:27 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-09-29T14:13:27Z</dc:date>
    <item>
      <title>Help using the SAS CALMAR macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896416#M354199</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I get an error message that I don't understand when I use the SAS CALMAR macro to calculate the weights. I read the documentation and apply it but it doesn't work. Even the example given in the documentation does not work for us.&lt;/P&gt;
&lt;P&gt;Here is my data and the Squid macro. Can anyone help me or someone who has already used this SAS Calmar macro can explain to me what is wrong in my code or if I forgot a line of code before running the macro SAS CALMAR.&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;BR /&gt;Gick&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data BDD_recod;
  input Nom $ sexe $ X $ Pond ;
  datalines;
Jean Masculin 0-4ans 10
Marie Feminin 5-14ans 10
Pierre Masculin 15-24ans 10
J Feminin 0-4ans 10
M Feminin 5-14ans 10
Pe Masculin 0-4ans 10
Je Masculin 15-24ans 10
Ma Masculin 0-4ans 10  
Pire Feminin 25-30ans 10
Mfir Feminin 35-40ans 10
Pell Masculin 40-45ans 10
Jeurs Masculin 15-24ans 10
Mam Masculin 0-4ans 10  
Piress Feminin 15-24ans 10
;

data marges_cibles;
  input VAR $ N MAR1-MAR6 ;
  Cards;
sexe 2 67866 80149 . . . .
X 6 33065.5 39023 35281 21382 11561 7702
;



%CALMAR(DATA=BDD_recod, POIDS=Pond, IDENT=Nom, DATAMAR=marges_cibles, M=2,EDITPOI=OUI,OBSELI=OUI,DATAPOI=SORTIE,POIDSFIN=PONDFIN,LABELPOI=pondération raking ratio)



&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 13:41:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896416#M354199</guid>
      <dc:creator>Gick</dc:creator>
      <dc:date>2023-09-29T13:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help using the SAS CALMAR macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896417#M354200</link>
      <description>&lt;P&gt;When you get an error in the code, SHOW US the log. We need to see the ENTIRE log for the PROC or DATA step that has the error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you get an error in a macro, please turn on the macro debugging option by running this line of code and then run the macro again, and then show us the log for this PROC or DATA step that has the error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Copy the log for the PROC or DATA step that has the error and paste it into the window that appears when you click on the &amp;lt;/&amp;gt; icon.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaigeMiller_0-1663012019648.png" style="width: 859px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75161i0E71B1489A6C9839/image-size/large?v=v2&amp;amp;px=999" role="button" title="PaigeMiller_0-1663012019648.png" alt="PaigeMiller_0-1663012019648.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Also, it would help if you gave us a link to the CALMAR macro.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 13:56:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896417#M354200</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-09-29T13:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help using the SAS CALMAR macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896419#M354202</link>
      <description>In fact, it is a macro developed by INSEE and in the documentation &lt;A href="https://www.insee.fr/fr/statistiques/fichier/2021902/doccalmar.pdf" target="_blank"&gt;https://www.insee.fr/fr/statistiques/fichier/2021902/doccalmar.pdf&lt;/A&gt;&lt;BR /&gt;and the web  &lt;A href="https://www.insee.fr/fr/information/2021902" target="_blank"&gt;https://www.insee.fr/fr/information/2021902&lt;/A&gt; , you just have to download the SAS code of the macro and then call it.&lt;BR /&gt;&lt;BR /&gt;I just applied the example given in the macro documentation. I don't know why this isn't working for me.</description>
      <pubDate>Fri, 29 Sep 2023 14:04:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896419#M354202</guid>
      <dc:creator>Gick</dc:creator>
      <dc:date>2023-09-29T14:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help using the SAS CALMAR macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896422#M354204</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416124"&gt;@Gick&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;I just applied the example given in the macro documentation. I don't know why this isn't working for me.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I asked to see the log, I gave specific details on what I want to see and how to present it. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 14:13:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896422#M354204</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-09-29T14:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Help using the SAS CALMAR macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896425#M354207</link>
      <description>Yes, I understood your question but the macro was not developed by me but by INSEE. She put the documentation to use it without putting how she programmed certain macro variables. I will have difficulty answering your question concretely because I am just using the macro</description>
      <pubDate>Fri, 29 Sep 2023 14:29:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896425#M354207</guid>
      <dc:creator>Gick</dc:creator>
      <dc:date>2023-09-29T14:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help using the SAS CALMAR macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896432#M354208</link>
      <description>&lt;P&gt;That page seems to only have SAS CATALOG files.&amp;nbsp; They MIGHT have a COMPILED version of the macro.&amp;nbsp; But compiled SAS macros are not PORTABLE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But it does have a link to a GITHUB repository, &lt;A href="https://github.com/InseeFr/Calmar/blob/main/Calmar.sas" target="_blank" rel="noopener"&gt;https://github.com/InseeFr/Calmar/blob/main/Calmar.sas&lt;/A&gt; , where you can get the actual macro definition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the %MACRO statement in that code file has the / STORE option on it which cause attempts to compile to fail with this error message:&lt;/P&gt;
&lt;PRE&gt;ERROR: The MSTORED option must be set to use the /STORE macro statement option.
ERROR: A dummy macro will be compiled.
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;So first REMOVE that /STORE option.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Then compile the macro.&lt;/P&gt;
&lt;P&gt;Then try the examples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might also have trouble with the character set used in the macro definition.&amp;nbsp; And of course the documentation all appears to be in French.&lt;/P&gt;
&lt;PRE&gt;Un petit exemple de calage sur marges                                                         12:14 Thursday, September 28, 2023   8


                           **********************************
                           ***   Param?tres de la macro   ***
                           **********************************


 Table en entr?e                     DATA      =  DON
  Pond?ration initiale               POIDS     =  POND
  Pond?ration Qk                     PONDQK    =  __UN
  Identifiant                        IDENT     =  NOM

 Table des marges                    DATAMAR   =  MARGES
  Marges en pourcentages             PCT       =  NON
  Effectif de la population          EFFPOP    =

 M?thode utilis?e                    M         =  2
  Borne inf?rieure                   LO        =
  Borne sup?rieure                   UP        =
  Seuil d'arr?t                      SEUIL     =  0.0001
  Nombre maximum d'it?rations        MAXITER   =  15

 Table contenant la pond. finale     DATAPOI   =  SORTIE
  Mise ? jour de la table DATAPOI    MISAJOUR  =  OUI
  Pond?ration finale                 POIDSFIN  =  PONDFIN
  Label de la pond?ration finale     LABELPOI  =  pondération raking ratio
  Contenu de la table DATAPOI        CONTPOI   =  OUI

 Edition des poids                   EDITPOI   =  OUI
  Statistiques sur les poids         STAT      =  OUI

 Contr?les                           CONT      =  OUI
 Table contenant les obs. ?limin?es  OBSELI    =  OUI
 Notes SAS                           NOTES     =  NON
&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Sep 2023 14:56:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896432#M354208</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-09-29T14:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help using the SAS CALMAR macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896436#M354209</link>
      <description>&lt;P&gt;&lt;STRONG&gt;What is the error message you receive?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could have missed a semicolon or compiled the macro wrong....in fact your code doesn't show the &lt;STRONG&gt;macro compilation step&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which is why we need to see the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416124"&gt;@Gick&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I get &lt;STRONG&gt;an error message that I don't understand&lt;/STRONG&gt; when I use the SAS CALMAR macro to calculate the weights. I read the documentation and apply it but it doesn't work. Even the example given in the documentation does not work for us.&lt;/P&gt;
&lt;P&gt;Here is my data and the Squid macro. Can anyone help me or someone who has already used this SAS Calmar macro can explain to me what is wrong in my code or if I forgot a line of code before running the macro SAS CALMAR.&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;BR /&gt;Gick&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data BDD_recod;
  input Nom $ sexe $ X $ Pond ;
  datalines;
Jean Masculin 0-4ans 10
Marie Feminin 5-14ans 10
Pierre Masculin 15-24ans 10
J Feminin 0-4ans 10
M Feminin 5-14ans 10
Pe Masculin 0-4ans 10
Je Masculin 15-24ans 10
Ma Masculin 0-4ans 10  
Pire Feminin 25-30ans 10
Mfir Feminin 35-40ans 10
Pell Masculin 40-45ans 10
Jeurs Masculin 15-24ans 10
Mam Masculin 0-4ans 10  
Piress Feminin 15-24ans 10
;

data marges_cibles;
  input VAR $ N MAR1-MAR6 ;
  Cards;
sexe 2 67866 80149 . . . .
X 6 33065.5 39023 35281 21382 11561 7702
;



%CALMAR(DATA=BDD_recod, POIDS=Pond, IDENT=Nom, DATAMAR=marges_cibles, M=2,EDITPOI=OUI,OBSELI=OUI,DATAPOI=SORTIE,POIDSFIN=PONDFIN,LABELPOI=pondération raking ratio)



&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 14:47:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-using-the-SAS-CALMAR-macro/m-p/896436#M354209</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-09-29T14:47:24Z</dc:date>
    </item>
  </channel>
</rss>

