f



Re: SAS Table help #2

Monti,

Either Ian, I, or both of us have misunderstood what you might be looking
for.  If your data show the number of missing data elements, by product
type, then I think you want something like the following:

data have;
  input Product $ ItemA   ItemB ItemC ItemD ItemF;
  cards;
A    1      .     2     9     .
B    2      2     0     3     9
C    6      5     9     .     8
D    5      .     5     7     8
E    5      .     2     8     .
F    .      2     3     6     7
G    .      8     2     .     5
H    5      .     .     8     1
;

data temp;
  set have ;
  nmiss = sum (of item: ) ;
run;

proc sql;
  create table want as
    select product,nmiss,100*nmiss/sum(nmiss) as pct_of_total
       from temp;
quit;

HTH,
Art
---------
On Mon, 2 Feb 2009 13:14:41 -0800, Mahbub Khandoker <mk_sas1@YAHOO.CA>
wrote:

>Hi there,
>I am very new to SAS. I want to create a table from SAS database which
includes statistics for all the missing data elements by product type.
>The database looks like as follows,
>�
>Product����������� ItemA�� ItemB ItemC ItemD ItemF
>A�������������������� 1��������� �����������
2��������� 9���������
>B��������������������� 2��������� 2���������
0��������� 3��������� 9
>C�������������������� 6��������� 5���������
����������� 9.�������� 8
>D�������������������� 5��������� �����������
5��������� 7��������� 8
>E��������������������� 5��������� �����������
2��������� 8���������
>F��������������������� ����������� 2���������
3��������� 6��������� 7
>G�������������������� ����������� 8���������
2��������� ����������� 5
>H�������������������� 5��������� �����������
����������� 8��������� 1
>�
>Therefore I want to create a table that provides missing values statistics
by product.
>�
>Product����������� # of Missing Value������� % of Missing Value
>�
>Another requirement to create the above table where the missing values
greater than 10% of the total records.
>�
>Thanks in advance for your help!
>Monti
>�


      __________________________________________________________________
Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo!
Canada Messenger at http://ca.beta.messenger.yahoo.com/
0
art297 (4213)
2/2/2009 11:39:32 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

0 Replies
542 Views

Similar Articles

[PageSpeed] 32

Reply:

Similar Artilces:

Re: Help with SAS Hash Tables #2
Mark: Try adding a sequential number to your dataset and defining a composite key, "n","SUID". S -----Original Message----- From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu] On Behalf Of mschult@bu.edu Sent: Thursday, February 28, 2008 11:22 AM To: sas-l@uga.edu Subject: Help with SAS Hash Tables I just discovered the SAS Hash table facility and it seems to solve a common problem rather elegantly. Problem is, I can't get it to work. It seems to throw away some of the data. Any help would be appreciated. Mark Here's my code and an example f...

Re: Old SAS Guy needs help with some of these new fangled SAS #2
It's been a while since I used the Import Wizard but as I recall, there is a window which asks for a file name where SAS can store the input statments for your future use. Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977 Jim Groeneveld <jim.1stat@YAHOO. COM> To Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU Discussion" cc <SAS-L@LISTSERV.U GA.EDU> Subject Re: Old SAS Guy needs help with some of these new fangled SAS 12/02/2008 04:49 9.1.3 gizmos for Windows AM Please respond to Jim Groeneveld <jim.1stat@YAHOO. COM> Hi John, I believe PROC IMPORT writes dedicated data step code to the log that you can reuse. Regards - Jim. -- Jim Groeneveld, Netherlands Statistician, SAS consultant home.hccnet.nl/jim.groeneveld On Tue, 2 Dec 2008 00:26:53 -0600, John F. Regus <jfregus@IX.NETCOM.COM> wrote: >Greetings all who have helped me in the past. > >Here is something that has been bothering me unending and is causing me sl...

Re: suggest: improve SAS Deployment Wizard for SAS v9.2, phase 2 #2
> From: A Little Birdie > > I just searched the SAS-L archives (should have done that > first) and found references to these two pages: > > http://www.sascommunity.org/wiki/Category:V9.2_Phase_2 > > http://www.sascommunity.org/wiki/V9.2_Phase_2_install_guide > > Have you seen this page? > ***************************************************** > http://support.sas.com/kb/35/631.html <---<<< NICE! ***************************************************** > It looks like it addresses your needs, and might be something > nice to add to the SASCo...

Re: Unix help: How to hold a SAS run subsequent to run of another application inside SAS #2
Duck-Hye Yang <dyang@CHAPINHALL.ORG> wrote: > I am Unix user. > I tried to run an application inside SAS. > I need to use the output from the application in a subsequent SAS run. > I need to hold the subsequent SAS run until runing the application is done. > The problem is that when I tried to run together, the subsequent SAS program always picked up incomplete output. > It seems like two applications are running simulatenously. First off, do you really need to run an external process, or would it be easier to do that part of the work in SAS as well? (Just a thought, ...

Re: R vs. SAS (was Replacement for SAS (SPSS vs. SAS, redux)) #2
Sounds like R is the SAS equivalent of Linux .. who are incidentally in all sorts of a copy left/right mess at the moment. On Thu, 5 Feb 2004 09:39:37 -0500, Peter Flom <flom@NDRI.ORG> wrote: >I use both SAS and R; I"ve used SAS for 10 or 15 years, R for about 6 >months - 1 year. > >Each has strengths and weaknesses; I'd not like to give up either. > >Strengths of SAS (esp. compared to R) > >Tech support - I have SAS tech support's phone number and our license >number memorized. They're great. > >SAS-L - There's also an R-help list...

Re: SAS Sample 1728 Was ---> Re: SAS Sample 1727 #2
Graham , I am not sure that the SI Tech Support examples should have all the error checking that Chang wanted to throw in the macro. The examples should be clear concise and easy to read and get going, as well as be illistrative. Too much error checking in an example well is just over kill and even detrimental to an example. However, any code solution on the SI Tech Support web sit should follow basic rules of good practices and sound advice. Such as with thier macros having atleast a somewhat good Macro design. Look at Example SAS Sample 1728: The first method well lets say is soooo bad...

Re: HELP! SAS Error re: Linesize #2
Chris, Take the lesson from this sample which go over 256 positions data list; v1 =repeat('A', 260); v2 =repeat('Z', 260); run; options linesize =120; proc report data=list nowd spacing=5 ; column v1 v2; define v1 / width =30 flow "v1-----"; define v2 / width =30 flow "v2-----"; run; %let pwd=%sysfunc(pathname(WORK)); ods listing close; ods html file="&pwd\linesize.htm"; proc report data=list nowd spacing=5 ; column v1 v2; define v1 / flow "v1-----"; define v2 / flow "v2-----"; run; ods html close...

Re: suggest: improve SAS Deployment Wizard for SAS v9.2, phase 2
Subject: Re: v9.2 phase 2, page update "Make the installation of SAS BI Server easier!" .... Ok w/me! Just remember that the majority of us are still just installing only SAS Foundation v9.2, and possibly Enterprise Guide v4.2 My rant/suggestion to Tech Support has been addressed. I have added notes about my conversation with Tech Support to this sas community wiki page: http://www.sascommunity.org/wiki/V9.2_Phase_2_install_guide summary: if you have Build # greater than or equal to 28 then you can dispense with ForceInstall. Ronald J. Fehd, IT Spec HelpDesk Level 3: SAS CDC S...

Re: SAS/DMS library default library allocations using SAS V8.2 on #2
The library allocations have to be stored <somewhere>, otherwise you wouldn't continue to get the prompt. You can look under your userid to see if it's there (though I suspect you've already done that), but a better question would be directed at the SAS sysadmin--ask them where these profiles/customizations are stored (the sasuser.profile is the generic one--your personal one is concatenated along with it). You may be able to see your session info under your userid tso log (shows usage information), though off the top of my head I can't remember if it captures al...

Re: Running SAS jobs sequentially in batch mode
> Note that unless you clean up work datasets and any macro variables created by each production job, subsequent jobs will not be starting in a pristine environment. It may be a good idea to include a new program between each production job to kill all work datasets and query sashelp.vmacro to create %symdel statements to delete macro variables. Would you be kind enough to give sample statements to do the CLEANING and KILLING? Susie Li TV Guide 1211 Avenue of the Americas New York, NY 10036 Tel 212.852.7453 Email susie.li@tvguide.com -----Original Message----- From: SAS(r) Discussion [m...

Re: SAS 9.2 Update on problem re Help files
On Mon, 25 Aug 2008 09:25:35 -0400, "Peter Flom" <peterflomconsulting@MINDSPRING.COM> said: > Hi again > > A week ago, I asked this list about a problem with 9.2: When you click > "help" it runs an index, but it doesn't save the index when you quite > SAS, so, each time you quit SAS, you lose the index. > > Replies received here did not work, so I wrote to SAS. > > They said, essentially, that it's a known bug, and they are working on > it. So you're responsible for the item in today's Tech Support Notes. Congratulations...

Re: SASTip104
Hi All, A couple of additional tidbits: For 8.2, if the SASonlinedoc has been (separately) loaded, you typically get an entry in your Start/Programs/The SAS System/SAS OnLine Doc V8 a link to start it up. Additionally the: C:\Program Files\SAS Institute\SAS\V8\core\help\base.hlp\docloc.htm notates that you can add the supplied entries into your SAS configuration file to tie it in. For v9, the onlinedoc seems to be part of the load/install process. However, you certainly can create a Shortcut for example the "Index" tab portion of the onlinedoc by creating a shortcut icon to: &qu...

Re: SAS Table help
Summary: Possible answers - data manipulation. #iw-value=1 Monti, This might be what you want. data want ( where = (pctmiss > 10) ) ; set have ; /* see data below */ nmiss = nmiss (of item: ) ; /* or nmiss (of itema -- itemf ) ; */ /* or nmiss ( itema, itemb, itemc, itemd, iteme, itemf ) ; */ pctmiss = 100 * nmiss / 6 ; run ; I have assumed your second requirement > Another requirement to create the above table where the missing > values greater than 10% of the total records. means greter than 10% of the items on a record. If you really mean of total records, then I do not understand the problem. Perhaps you should show how to calculate by hand what is wanted. In genereral you will find the data structure product item stat a a 1 a b . a c 2 ... b a 2 ... far more flexible. One way to get this would be proc transpose data = have out = good (rename=(col1=stat)) ; by product ; var item: ; run ; Here you might mean proc summary data = good ; class _name_ ; var stat ; output out = summary nmiss=nmiss ; run ; data want ; set summary ; where nmiss > .1 * _freq_ ; pct = 100 * nmiss / _freq_ ; run ; Ian Whitlock =============== Date: Mon, 2 Feb 2009 13:14:41 -0800 From: Mahbub Khandoker <mk_sas1@YAHOO.CA> Subject: SAS Table help Hi there...

Re: SAS Graph help- help connecting lines to adjacent points only #2
Thanks. That did get it to work- I did add a if first.study_nbr then counter=0; So the counters on each treatment would start over at 1 for each subject. Now my graphs are looking a lot better. Thanks. -Mary ----- Original Message ----- From: Nat Wooding To: SAS-L@LISTSERV.UGA.EDU Sent: Wednesday, February 25, 2009 4:05 PM Subject: Re: SAS Graph help- help connecting lines to adjacent points only (OR changing treatment name in data set if it occurs again) Data test; set test; by study_nbr notsorted treatment; if first.treatment then counter+1; treatment = compress( treatment || put( counter , 3. )); run; ...

Re: Autoexec.sas file Dm"pgm;zoom;"; doesnot wrk in SAS 9.2 #2
Hi Ace, The PGM is the editor window up through v6.12 but also still exists today. For the Enhanced Editor you can use: dm editor 'zoom' wedit ; Hope this is helpful. Mark Terjeson Investment Business Intelligence Investment Management & Research Russell Investments 253-439-2367 Russell Global Leaders in Multi-Manager Investing -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Ace Sent: Wednesday, October 14, 2009 5:49 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Autoexec.sas file Dm"pgm;zoom;"; doesnot wrk in SAS...

Re: SAS 8.2 = SAS 8.02 ?
On Mon, 6 Dec 2004 10:29:57 -0500, Igor Kurbeko <ikurbeko@ATHEROGENICS.COM> wrote: >Hi, guys. > > > >Are SAS releases 8.2 and 8.02 one and the same? > > > >I wanted to apply hot fix for SAS Release 8.2 (TS2M0) B2BB97. > >But we use SAS 8.02 Hi, Igor, SAS releases 8.2, 8.02, and 8e refer to the same thing Release 8.2 (TS2M0), at least on Windows platform and likely so in other platforms. It seems an outcome of the development and marketing not in sync -- which is much frequent happening in the industry. Like Java 2 is in fact Java 1.2 and above, ms off...

Re: EWMA in base SAS / or SAS/STAT? #2
>From: Michael Murff <mysasbox@GMAIL.COM> >Reply-To: Michael Murff <mysasbox@GMAIL.COM> >To: SAS-L@LISTSERV.UGA.EDU >Subject: EWMA in base SAS / or SAS/STAT? >Date: Wed, 11 Oct 2006 18:57:15 -0600 > >Hi, > >I'm wondering if others are aware of open source coding for Exponentially >Weighted Moving Average (EWMA) or other advanced time series smoothers (eg. >holt winters) in base SAS? Just putting out a feeler in the hope that I >don't have to reinvent the wheel :-) > >TIA, > >M.M. I'm guessing you're still in that SQC ...

Re: Difference Between PC SAS and UNIX SAS #2
I cannot give a complete list by any means for these two systems but there are functions listed in TS486 that are specific to windows and afaik, Sleep is one of these. I suggest that you look at the Companion to the ... Operating System in the online docs for each of these and compare the two systems. Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977 Suthakar Iyer <suthakariyer@YAH OO.COM> To ...

Re: SAS help needed #2
Look at the BY statement and the FIRST.xx temporary variable. They will tell you when you need to reset the suffix of new_var. Look at the MOD function. It will allow to cycle the suffix every n entries. Look at the RETAIN statement. It will let you keep a the value of a counter across iterations of your DATA step. Look at the PUT function. It will let you construct a value from different pieces. You may also use the concatenation operator as part of this process. Try to use a more descriptive title in the future. It would also help if you gave some indication that you tried to do th...

Re: SAS code help #2
hi, try to write the following option before the data step that calls the infile : Options validvarname=any; data enc(drop=trailer records totamtpaid) trailer(keep=trailer records totamtpaid); infile mydir truncover; .... ... Daniel Fernandez. Barcelona 2010/1/27 Ruby <windofoct@gmail.com>: > hi SAS experts, > > I need to read some raw data files into sas. However, the files name > has an invalid "-' sign in it. So, I tried to modify the old program > by adding a new variable "sourcefile1" but with no success. Can anyone > here help to explain...

Re: HELP
> Can someone explain what the SAS Supervisor is (or who) and > what it (or he) does? Jimmy, Try doing a search on '"SAS Supervisor"' on Google. If you're feeling lucky: http://www.ita.doc.gov/td/industry/otea/dcsug/super3.pdf Refs therein: Donald J. Henderson, (1983), "The SAS Supervisor," Proceedings of the Eighth Annual SAS Users Group International Conference, 924-931. Tom Miron, (1996), "The Secret Life of the DATA Step," Proceedings of the Twenty-First Annual SAS Users Group International Conference, 170-177 Mary G. Rabb, Donald J. H...

Re: SAS/Intrnet help #2
John is correct that Sessions is something to look into. If you were to use sessions, each user would have their own separate WORK library (called SAVE). After the session ends (due to no activity) SAS will delete the SAVE library. If you need to build unique names for each user, and if you have http authentication turned on (i.e., user must enter an id/pw to access your intranet), you might check into whether you can use the value of _rmtuser. HTH, -don h -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of John Kramer Sent: Tuesday, November 15,...

Re: Free SAS Help #2
Ian, I think you have some misunderstanding. I have paid sas institute to use their software for my personal use, and I am not a sas programmer or statistician where i work. I used to be sas programmer at a pharma company few years back. The reason i was saying i have a job is because that i was trying to convince people that I am not expecting to score a job from them, and i am truly trying to volunteer just out of my personal interest. You just discouraged me. I don't understand why people get angry for nothing? I am not trying to take away anybody's job. Anyway, I am not interested for free work anymore. ...

Re: SAS vs. SPLUS vs. SAS #2 1617385
Hi Paul have not used S-Plus since around 2000-2002 so this may be Old News from S-Plus conference attendance they know their strength is: * rapid prototyping * great graphics downside: * you want speed! load all data into memory! column-wise operations * need to upgrade hardware w/more memory for large data sets * check documentation to find BigData functions which, iirc, operate like SAS does: row-wise previous version: v7 current version: v8.1 *** SAS: SAS/IML now has IML/Studio which enables access to R programs R is the open-source version of S+ ...

Web resources about - Re: SAS Table help #2 - comp.soft-sys.sas

Table of United States Core Based Statistical Areas - Wikipedia, the free encyclopedia
for the United States of America . The OMB defines a Core Based Statistical Area as one or more adjacent counties or county equivalents that ...

Sustainable seafood on more Australian tables as traceability practices improve
From cans to&nbsp;fish shop windows and restaurant plates, 30 per cent of the world's seafood is still mislabelled.

An AnandTech Round Table with ASUS: 10 Years of the Republic of Gamers
... Rajinder 'Raja' Gill Technical PR Manager, ASUS USA AnandTech Motherboard Senior Editor 2008-2010 Ian Cutress 10 Years of ROG Round Table ...

Lithuanian Designer Launches Standing App For His Funky Table
... at the office. His back started to hurt and his productivity seemed to decrease. "That was the time when I started my hunt for a suitable standing ...

Disney CEO says selling ESPN a la carte is on the table
Disney CEO Bob Iger says Disney needs to improve on the digital front, and that selling ESPN direct-to-consumer is on table . Speaking at the ...

Joe's Crab Shack apologizes for photo of black man's 1895 hanging at table
People Magazine Joe's Crab Shack apologizes for photo of black man's 1895 hanging at table Charlotte Observer An image on a table at a Joe's ...

Daily Table: Good food for cheap
Daily Table is on a mission to sell healthy food so cheap it can compete with fast food.

Minnesota diners stunned by lynching photo embedded in diner table
The owners of a Joe's Crab Shack diner has apologized for the inclusion of the photo, along with a troubling joke, in the restaurant's table ...

Aussie School Head, Avowed Global Warming Warrior Tables Requests To Divest — Too Pricey To Quit Oil
'The council has to balance both its fiduciary responsibilities to provide the funds for students and staff needs'

Morning Digest: Can Team Blue retake the House in 2016? Only if they completely run the table
Leading Off : ● House : Daily Kos Elections is pleased to present our initial House race ratings for the 2016 election cycle . Mid-decade redistricting ...

Resources last updated: 3/16/2016 12:35:56 PM