<?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: How to create observation in a variable which has existing observations in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/537191#M6749</link>
    <description>&lt;P&gt;I think you need to go back and answer this question then, I'm clearly not the only confused by your question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;This may be easier if you show what you have as a starter and what you want as the final output&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, dummy variables aren't needed for most procedures, SAS will create them automatically. If you need to create dummy variables, there are several easy ways to do so and then you can test the various hypothesis using contrast statements.&lt;/SPAN&gt;&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/236770"&gt;@shanky_44&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Reeza,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This problem is more about creating dummy variables and then transpose them on some parameters. By the shell it looks like it is calculation scenario but it is not. Even I have not clarified the things properly here because it is a lengthy process and I am just asking&amp;nbsp; in mid where ever I get struck. Thanks for the help!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Feb 2019 20:44:09 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-02-20T20:44:09Z</dc:date>
    <item>
      <title>How to create observation in a variable which has existing observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/536921#M6689</link>
      <description>&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to SAS and trying to learn as much&amp;nbsp; as possible. While practicing, I came across a data set in which I need to create a variable with particular observations. I think this problem can be solved from first. and last. observation. However, expecting experts feedback and please provide alternate solutions as well as, if possible. Thanks !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem ;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data is similar to this scenario: new var is a character variable&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;name&amp;nbsp; country&amp;nbsp; gender&amp;nbsp; New_var&amp;nbsp;&lt;/P&gt;&lt;P&gt;x&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;M&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; D1&lt;/P&gt;&lt;P&gt;x1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Y1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; F&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;D2&amp;nbsp;&lt;/P&gt;&lt;P&gt;X2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Y2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;M&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; D1&lt;/P&gt;&lt;P&gt;X3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Y3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;M&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; D2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here I have created new_var and I have D1 and D2 values but I need to have D1 +D2 observation is same variable along existing observation.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 21:37:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/536921#M6689</guid>
      <dc:creator>shanky_44</dc:creator>
      <dc:date>2019-02-19T21:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to create observation in a variable which has existing observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/536928#M6690</link>
      <description>&lt;P&gt;I suggest you start by reviewing the definitions of &lt;U&gt;Observation&lt;/U&gt; and &lt;U&gt;Variable&lt;/U&gt; in SAS. Then you might want to reword your question.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 21:50:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/536928#M6690</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-02-19T21:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create observation in a variable which has existing observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/536929#M6691</link>
      <description>This may be easier if you show what you have as a starter and what you want as the final output. I *think* you're starting with name, country, and gender, and you're trying to calculate New_var?</description>
      <pubDate>Tue, 19 Feb 2019 21:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/536929#M6691</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-19T21:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to create observation in a variable which has existing observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/536949#M6696</link>
      <description>&lt;P&gt;Wow that is almost confusing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post a sample dataset of what you want and the SAS code you have tried.&amp;nbsp; Your sample code might assist the community with understanding your request.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 01:24:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/536949#M6696</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-02-20T01:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to create observation in a variable which has existing observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/537084#M6729</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shell.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27306i4723E516BE76E9B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="shell.PNG" alt="shell.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this is the shell. ROI variable is not in our data,&amp;nbsp; I have created ROI varibale with ROI 1 and ROI 2 observation in data set with the help of one variable. Now I want ROI 1 + ROI 2 in same variable with&amp;nbsp; other observation.&amp;nbsp; I know it is not explained well but in this platform and the technicality of work, I am not able to explain everything. I apologize&amp;nbsp; and thanks for everyone for trying to help me out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 14:11:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/537084#M6729</guid>
      <dc:creator>shanky_44</dc:creator>
      <dc:date>2019-02-20T14:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create observation in a variable which has existing observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/537085#M6730</link>
      <description>&lt;P&gt;Hi Reeza,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually, it is a lengthy work I can share everything here. I have posted a shell above and I have to create listing for that. The issue was variable ROI is not in our data so i have created a variable in data set and populated the value on the basis of other variable. But I need one more observation which should be ROI 1 + ROI 2 . I was not clear how to get that. I am really sorry it is still messed up. I am not able to explain clearly, but thanks for the help. while posting this, I think I got the answer. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 14:19:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/537085#M6730</guid>
      <dc:creator>shanky_44</dc:creator>
      <dc:date>2019-02-20T14:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to create observation in a variable which has existing observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/537120#M6736</link>
      <description>&lt;P&gt;Look up multilabel formats, with PROC MEANS or TABULATE is likely what you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or PROC TABULATE can do it all at once.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=sashelp.class;
class sex age;
var height;

table (sex all = 'M + F')* age , height*(mean median min max);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 16:05:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/537120#M6736</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-20T16:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to create observation in a variable which has existing observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/537149#M6742</link>
      <description>&lt;P&gt;Hi Reeza,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This problem is more about creating dummy variables and then transpose them on some parameters. By the shell it looks like it is calculation scenario but it is not. Even I have not clarified the things properly here because it is a lengthy process and I am just asking&amp;nbsp; in mid where ever I get struck. Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 18:35:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/537149#M6742</guid>
      <dc:creator>shanky_44</dc:creator>
      <dc:date>2019-02-20T18:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to create observation in a variable which has existing observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/537191#M6749</link>
      <description>&lt;P&gt;I think you need to go back and answer this question then, I'm clearly not the only confused by your question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;This may be easier if you show what you have as a starter and what you want as the final output&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, dummy variables aren't needed for most procedures, SAS will create them automatically. If you need to create dummy variables, there are several easy ways to do so and then you can test the various hypothesis using contrast statements.&lt;/SPAN&gt;&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/236770"&gt;@shanky_44&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Reeza,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This problem is more about creating dummy variables and then transpose them on some parameters. By the shell it looks like it is calculation scenario but it is not. Even I have not clarified the things properly here because it is a lengthy process and I am just asking&amp;nbsp; in mid where ever I get struck. Thanks for the help!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 20:44:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/537191#M6749</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-20T20:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to create observation in a variable which has existing observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/538343#M6922</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yeah, I know and I apologize for that. This is a listing format and a long process. I am just asking where i am confused with either data orientation (transpose rule) or new dummy data creation. I would not be able to share data here. However, I am really thankful for your efforts. At least I have learned one new thing which you mentioned in Proc tabulate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you will understand. and I will try to explain better next time for further queries.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Everyone!&lt;/P&gt;&lt;P&gt;Shanky&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 17:01:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-create-observation-in-a-variable-which-has-existing/m-p/538343#M6922</guid>
      <dc:creator>shanky_44</dc:creator>
      <dc:date>2019-02-25T17:01:31Z</dc:date>
    </item>
  </channel>
</rss>

