<?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: Change values (purposefully) between two groups until both proportions are equivalent in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Change-values-purposefully-between-two-groups-until-both/m-p/627179#M20496</link>
    <description>&lt;P&gt;Hi Ksharp - and thank you. Sadly, no, running&amp;nbsp;SAS University Edition via virtual machine.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Feb 2020 13:40:24 GMT</pubDate>
    <dc:creator>N8</dc:creator>
    <dc:date>2020-02-25T13:40:24Z</dc:date>
    <item>
      <title>Change values (purposefully) between two groups until both proportions are equivalent</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Change-values-purposefully-between-two-groups-until-both/m-p/627088#M20486</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question: I have a dataset with three columns [ID $; Group (class variable); Value (continuous)] - sample code provided below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal: change values for group 0 to be equivalent to the values for group 1 (by equivalent I want both groups to have same average).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem: I can't make up values. A member (ID) from Group 0 *must* take a value from group 1 (doesn't matter who) and the program needs to terminate once the averages between the two groups are equivalent (or ideally a user specified tolerance, say 1% or 5% within each other). The other problem is that the dataset has dozens of other records that I need to retain, so do not want to transpose. Exporting the Group=1 into a new dataset and then re-joining to the original is fine, but I would like the structure to remain in tact.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate the help if someone has some time. Happy to clarify. Kind regards, Nate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data Step1;&lt;BR /&gt;input ID $ Continuous Group ;&lt;BR /&gt;datalines;&lt;BR /&gt;1 1792 0&lt;BR /&gt;6 1425 0&lt;BR /&gt;9 1782 0&lt;BR /&gt;10 2019 0&lt;BR /&gt;18 2294 0&lt;BR /&gt;20 1616 0&lt;BR /&gt;21 1551 0&lt;BR /&gt;24 1791 0&lt;BR /&gt;25 1828 0&lt;BR /&gt;26 1602 0&lt;BR /&gt;34 1611 0&lt;BR /&gt;35 1424 0&lt;BR /&gt;2 2498 1&lt;BR /&gt;3 2318 1&lt;BR /&gt;4 1848 1&lt;BR /&gt;5 1698 1&lt;BR /&gt;7 1964 1&lt;BR /&gt;8 2066 1&lt;BR /&gt;11 2348 1&lt;BR /&gt;12 2127 1&lt;BR /&gt;13 2340 1&lt;BR /&gt;14 2423 1&lt;BR /&gt;15 2184 1&lt;BR /&gt;16 2337 1&lt;BR /&gt;17 2233 1&lt;BR /&gt;19 1817 1&lt;BR /&gt;22 2196 1&lt;BR /&gt;23 2697 1&lt;BR /&gt;27 2156 1&lt;BR /&gt;28 2488 1&lt;BR /&gt;29 1977 1&lt;BR /&gt;30 2074 1&lt;BR /&gt;31 2084 1&lt;BR /&gt;32 2112 1&lt;BR /&gt;33 2251 1&lt;BR /&gt;36 1509 1&lt;BR /&gt;37 2357 1&lt;BR /&gt;38 2501 1&lt;BR /&gt;39 1309 1&lt;/P&gt;&lt;P&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2020 04:01:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Change-values-purposefully-between-two-groups-until-both/m-p/627088#M20486</guid>
      <dc:creator>N8</dc:creator>
      <dc:date>2020-02-25T04:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Change values (purposefully) between two groups until both proportions are equivalent</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Change-values-purposefully-between-two-groups-until-both/m-p/627102#M20487</link>
      <description>&lt;P&gt;Do you have SAS/QC ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Step1;
input ID $ number ;
datalines;
1 1792 0
6 1425 0
9 1782 0
10 2019 0
18 2294 0
20 1616 0
21 1551 0
24 1791 0
25 1828 0
26 1602 0
34 1611 0
35 1424 0
2 2498 1
3 2318 1
4 1848 1
5 1698 1
7 1964 1
8 2066 1
11 2348 1
12 2127 1
13 2340 1
14 2423 1
15 2184 1
16 2337 1
17 2233 1
19 1817 1
22 2196 1
23 2697 1
27 2156 1
28 2488 1
29 1977 1
30 2074 1
31 2084 1
32 2112 1
33 2251 1
36 1509 1
37 2357 1
38 2501 1
39 1309 1
;
run;

data treatments;
 trt=1;output;
 trt=2;output;
run;

proc optex data=treatments seed=123 coding=orthcan;
class trt;
model trt;

blocks design=step1;
model number;
output out=want;
run;

proc means data=want n mean std nway;
class trt;
var number;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Feb 2020 05:52:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Change-values-purposefully-between-two-groups-until-both/m-p/627102#M20487</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-02-25T05:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Change values (purposefully) between two groups until both proportions are equivalent</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Change-values-purposefully-between-two-groups-until-both/m-p/627179#M20496</link>
      <description>&lt;P&gt;Hi Ksharp - and thank you. Sadly, no, running&amp;nbsp;SAS University Edition via virtual machine.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2020 13:40:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Change-values-purposefully-between-two-groups-until-both/m-p/627179#M20496</guid>
      <dc:creator>N8</dc:creator>
      <dc:date>2020-02-25T13:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Change values (purposefully) between two groups until both proportions are equivalent</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Change-values-purposefully-between-two-groups-until-both/m-p/627385#M20526</link>
      <description>&lt;P&gt;If your dataset is small , could try Academic SAS On-Demand.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://odamid.oda.sas.com/SASLogon/login?service=https%3A%2F%2Fodamid.oda.sas.com%2FSASODAControlCenter%2Fj_spring_cas_security_check" target="_blank"&gt;https://odamid.oda.sas.com/SASLogon/login?service=https%3A%2F%2Fodamid.oda.sas.com%2FSASODAControlCenter%2Fj_spring_cas_security_check&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 02:49:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Change-values-purposefully-between-two-groups-until-both/m-p/627385#M20526</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-02-26T02:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Change values (purposefully) between two groups until both proportions are equivalent</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Change-values-purposefully-between-two-groups-until-both/m-p/628296#M20654</link>
      <description>&lt;P&gt;Thanks Ksharp - this solution does work.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 18:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Change-values-purposefully-between-two-groups-until-both/m-p/628296#M20654</guid>
      <dc:creator>N8</dc:creator>
      <dc:date>2020-02-28T18:38:12Z</dc:date>
    </item>
  </channel>
</rss>

