f



Re: PHREG SAS 8 vs SAS 9

Sorry I changed the number of loops to 10 instead of 1000 to reduce the
running time. But still, it takes much longer in SAS 9 compared to SAS
8...

----- Original Message -----
From: "Francois Torche" <torche@i-minds.be>
Sent: Fri, December 19, 2008 13:58
Subject:PHREG SAS 8 vs SAS 9

Hi All,

The following code runs in less than a minute on SAS 8.2 and more than 11
on SAS 9. I know it's something related to PHREG but I don't know why?

Any help would be appreciated ;-)

Thanks,
François

<CODE>
PROC FORMAT;
VALUE dis_fmt 1='Case' 0='Control';
VALUE exp_fmt 1='Vaccntd' 0='Unvaccntd';
RUN;

DATA test (label = Output Case-Control Macro 19DEC08:13:18:12 Search B);
Ncases = 200;
C_C_Rat = 2;
Vac_Cov = 0.8;
Market_sh = 1;
OR = 0.5;
Alpha = 0.05;
_theta = 2.5;
Limit = 1;
Uplow = "U";
OUTPUT;
RUN;

DATA test;
SET test nobs=last;
IF _N_ = last THEN CALL SYMPUT("NofTest",put(_N_,best.));
if (Vac_cov * OR)/(1-Vac_cov+Vac_cov * OR) > 1 then delete;
RD = (OR-1) * Vac_cov * (1-Vac_cov) / (1-Vac_cov + OR * Vac_cov);
Zalpha = PROBIT(1-Alpha/2);
LABEL Ncases = "Number of cases" C_C_rat = "Case-control ratio" VAC_COV =
"Vaccination coverage - baseline - P(vaccinated|not ill)" OR = "Odds
Ratio" Alpha = "Alpha
Error - Type I" Limit = "Upper or Lower limit for the confidence interval
of OR or VE" Uplow =
"Say if Limit is an upper or lower limit" ;
RUN;

ODS noresults;
ODS LISTING CLOSE;
DATA sample (KEEP = simulat disease exposure match vaccinated);
seed = 0;
ncaseold=0;
nctrlold=0;
pcases = (0.8*0.5) / (1 - (0.8*(1-0.5)));
pvacc = 1;
DO i=1 TO 10/*1000*/;
**run this loop from the 1st to the ith simulation;
simulat = i;
**set the variable simulation to the simulation number;
DO j=1+ncaseold TO 200+ncaseold;
**run this loop to create from to 1st to the jth case;
match=j;
disease=1;
CALL RANBIN(seed,1,pcases,exposure);
IF exposure=1 THEN DO;
vaccinated = 1;
IF pvacc NE 1 THEN DO;
CALL RANBIN(seed,1,pvacc,vaccinated);
**vaccinated with the vaccine under study;
IF vaccinated=0 THEN vaccinated=2;
*vaccinated with the other vaccine;
END;
END;
ELSE vaccinated=0;
OUTPUT;
END;
DO k=1+nctrlold TO 200*2+nctrlold;
match=CEIL(k/2);
disease=0;
CALL RANBIN(seed,1,0.8,exposure);
IF exposure=1 THEN DO;
vaccinated = 1;
IF pvacc NE 1 THEN DO;
CALL RANBIN(seed,1,pvacc,vaccinated);
IF vaccinated=0 THEN vaccinated=2;
END;
END;
ELSE vaccinated=0;
OUTPUT;
END;
END;
ncaseold=ncaseold+200;
nctrlold=nctrlold+200*2;
RETAIN ncaseold nctrlold;
format disease dis_fmt. exposure exp_fmt.;
RUN;

DATA Work._Simul_1;
SET sample;
IF vaccinated=2 THEN DELETE;
cas=2-disease;
RUN;

ODS LISTING CLOSE;
* OPTIONS NONOTES;
PROC PHREG DATA=Work._Simul_1 nosummary;
STRATA match;
MODEL cas*disease(0)=exposure/ties=discrete rl alpha=0.05;
BY simulat;
ODS OUTPUT ParameterEstimates=ORRand ;
RUN;
* OPTIONS NOTES;
DATA OR;
SET ORRand;
IF .z < HRUPPERCL < 1 THEN flgLT_up = 1;
ELSE IF HRUPPERCL >= 1 THEN flgLT_up = 0;
RUN;
</CODE>

----- End of original message -----
0
torche (21)
12/19/2008 12:59:54 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

0 Replies
900 Views

Similar Articles

[PageSpeed] 14

Reply:

Similar Artilces:

PHREG SAS 8 vs SAS 9
Hi All, The following code runs in less than a minute on SAS 8.2 and more than 11 on SAS 9. I know it's something related to PHREG but I don't know why? Any help would be appreciated ;-) Thanks, François <CODE> PROC FORMAT; VALUE dis_fmt 1='Case' 0='Control'; VALUE exp_fmt 1='Vaccntd' 0='Unvaccntd'; RUN; DATA test (label = Output Case-Control Macro 19DEC08:13:18:12 Search B); Ncases = 200; C_C_Rat = 2; Vac_Cov = 0.8; Market_sh = 1; OR = 0.5; Alpha = 0.05; _theta = 2.5; Limit = 1; Uplow = "U"; OUTPUT; RUN; DATA test; SET test nobs=last; IF _N_ = last THEN CALL SYMPUT("NofTest",put(_N_,best.)); if (Vac_cov * OR)/(1-Vac_cov+Vac_cov * OR) > 1 then delete; RD = (OR-1) * Vac_cov * (1-Vac_cov) / (1-Vac_cov + OR * Vac_cov); Zalpha = PROBIT(1-Alpha/2); LABEL Ncases = "Number of cases" C_C_rat = "Case-control ratio" VAC_COV = "Vaccination coverage - baseline - P(vaccinated|not ill)" OR = "Odds Ratio" Alpha = "Alpha Error - Type I" Limit = "Upper or Lower limit for the confidence interval of OR or VE" Uplow = "Say if Limit is an upper or lower limit" ; RUN; ODS noresults; ODS LISTING CLOSE; DATA sample (KEEP = simulat disease exposure match vaccinated); seed = 0; ncaseold=0; nctrlold=0; pcases = (0.8*0.5) / (1 - (0.8*(1-0.5))); pvacc = 1; DO i=1 TO 10/*1000*/; **run this loop from the 1st to the ith simulation; simulat = i; **set the vari...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #8
On Tue, 4 Sep 2007, Alan Churchill wrote: > It seems that a test like this would toss me out of the pool from the > get-go. Heck, maybe that's what the goal would be ;-] Well then, maybe the rest of us might have a chance then :) Given that I have not used SAS regularly in months, I would be hurting. Hopefully, I would not be tossed immediately either. Isn't one point of the test to allow a organization to call itself a partner or some other distinction? Maybe to be listed among companies on SI's websites? Kevin Kevin Viel, PhD Post-doctoral fellow Department of Geneti...

Re: SAS 9 and SAS 8
I suggest that you look at the SAS web site http://support.sas.com/documentation/whatsnew/index.html Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977 pausha <pausha1@GMAIL.CO M> To Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU Discussion" cc <SAS-L@LISTSERV.U GA.EDU> Subject SAS 9 and SAS 8 11/20/2008 03:28 PM Please respond to pausha <pausha1@GMAIL.CO M> Could someone send me the papers or articles that gives the differences between sas 8 and sas 9 and new function and changes in sas 9. Thanks CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and/or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copyi...

Re: R vs. SAS (was Replacement for SAS (SPSS vs. SAS, redux)) #4
No, sorry if I made it sound that way..... SAS and R are totally different in the way they work, how they are structured, what the statements look like, and so on. Not like French and Spanish, not even like English and Spanish. More like English and Swahilli. R has a lot in common with S Plus, both are based on the S language. But there is no hostility that I know of between S Plus and R (unlike the situation with Linux) Peter >>> <ben.powell@CLA.CO.UK> 2/5/2004 10:36:32 AM >>> wrote Sounds like R is the SAS equivalent of Linux .. who are incidentally in all sort...

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: R vs. SAS (was Replacement for SAS (SPSS vs. SAS, redux)) #5
I think that SAS and R are very similar, even though their designs are very different. What matters is that both can be used to accomplish the same things - just as English and Swahilli serve the same purpose (communication) equally well. As for the copyleft "mess", do you really believe the propaganda and outright lies perpetrated by some companies? Remember, they want you to pay $$$ for your software, and copyleft poses a huge threat to that goal. -----Original Message----- From: Peter Flom [mailto:flom@NDRI.ORG] Sent: Thursday, February 05, 2004 12:57 PM To: SAS-L@LISTSERV.UGA....

Re: R vs. SAS (was Replacement for SAS (SPSS vs. SAS, redux)) #3
Wow, that was a leap. Better not use Apache or PHP then. Andy >-----Original Message----- >From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On >Behalf Of ben.powell@CLA.CO.UK >Sent: Thursday, February 05, 2004 10:37 AM >To: SAS-L@LISTSERV.UGA.EDU >Subject: Re: R vs. SAS (was Replacement for SAS (SPSS vs. SAS, redux)) > >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 a...

SAS 9 and SAS 8
Could someone send me the papers or articles that gives the differences between sas 8 and sas 9 and new function and changes in sas 9. Thanks http://support.sas.com/documentation/whatsnew/index.html and many proceedings at http://www.lexjansen.com On Nov 20, 3:28=A0pm, pausha <paus...@gmail.com> wrote: > Could =A0someone send me the papers or articles that gives the > differences between sas 8 and sas 9 and new function and changes in > sas 9. > > Thanks ...

Re: SAS System Viewer 9.1 unable to open SAS datasets ( SAS 9.1.3)
A question in return: is your table from windows? compressed from another system? and specially with personnel formats hard coded inside? Andre msiddu2000 a �crit : > SAS System Viewer 9.1 was able to open datasets that were created by > V8 engine (SAS 8.2), but is unable to open datasets that are created > with V9 engine (SAS 9.1.3). > > Does this need SAS System Viewer to be upgraded ? > or > Something else needs to be done ? > > -- Andr� WIELKI INED (Institut National d'Etudes D�mographiques) Service Informatique 133 Boulevard Davout 75980 Paris Cedex 20 m�l : wielki@ined.fr t�l : 33 (0) 1 56 06 21 54 ...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year.
I took the advanced exam this April because I wanted a relatively systematic way of assessing my knowledge of SAS in a short time span. For that purpose, it was worth it. Since I learn SAS by doing new tasks, or re-doing old tasks in a new way, I assume my knowledge of SAS is uneven, even though I am regarded as productive, and frequently creative in using SAS to solve our group's problems. I passed the test, with lower subscores on the components that I expected to be weakest on. I thought many of the questions made me think about some fundamental, sometimes subtle, features of the lan...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #11
Kevin, Thank you for the nice words...I am sure I wouldn't have a chance on any stat exam, BTW. What I am good at is being in an absolute crisis and trying to get it solved with no time on the clock. That is why I think in a quirky manner. When the obvious isn't working, take a different path because there is simply no time left. It's what I did at MCI, SAS, and now as an independent. ....and that skill will not be measured on a certification exam or plopping me in front of a PC to hammer out an example SAS program. For any candidate, I can pick up their technical level with a few questions and watching their reactions. Alan Alan Churchill Savian www.savian.net -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Kevin Roland Viel Sent: Tuesday, September 04, 2007 4:02 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. On Tue, 4 Sep 2007, Alan Churchill wrote: > It seems that a test like this would toss me out of the pool from the > get-go. Heck, maybe that's what the goal would be ;-] Well then, maybe the rest of us might have a chance then :) Given that I have not used SAS regularly in months, I would be hurting. Hopefully, I would not be tossed immediately either. Isn't one point of the test to allow a organization to call itself a partner or some other distinction? Maybe to be listed among companies on SI's websites? Kevin Kevin ...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #10
I actually think you are straight-jacketing the interview for a senior person. I would definitely look for someone who thought outside of the box. That may be ways of doing things other than macros or ODS or else putting a new spin on them. I ditched most of the macro language a decade ago, for example. As a hiring manager, I always went for creativity and not specific skills on hand and was very pleased with my hires. But hey, I don't hire anymore so it isn't something I have to face. BTW, no client has ever asked me for certification nor have I been quizzed on specific SAS knowledg...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #7
Well Toby, let me ask something then. Since I am not an ODS fan and haven't used proc report/tabulate for some time, would that be an automatic disqualifier since you don't allow reference books or materials? SAS does not provide tools that help me code ODS (except for EG) and therefore a reference material is all I would need. Now, it's not like I haven't used proc report (used it extensively at one time), it's just that I prefer other means to produce the final output. It seems that a test like this would toss me out of the pool from the get-go. Heck, maybe that's wh...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #4
Ed , I still contend and stick with they should both be able to program and know how SAS works. I prefer the intervewing company give a test, were the person being interviewed is sat in front a laptop or desktop and told to write code to solve some problems. No online help no books just the persona nd the computer. This weeds out those who can code and those who cant, from those who can you then talk to them about the code they wrote and you can deduce those who understand how SAS works and thos who dont. The pool you are left with are the qualified candidates atleast from a SAS perspecti...

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: SAS vs. SPLUS vs. SAS #3
I don't know much about trials work, but it has been discussed on the r-help list, and there are definitely people who use R for this type of thing Peter -----Original Message----- >From: Paul Miller <pjmiller_57@YAHOO.COM> >Sent: Dec 11, 2009 4:09 PM >To: SAS-L@LISTSERV.UGA.EDU >Subject: SAS vs. SPLUS vs. SAS > >Hello Everyone, >� >I’ve recently become interested in sequential clinical trials designs. I’ve purchased a book that discusses the topic called “Analysis of Clinical Trials using SAS: A Practical Guide.” Upon trying to run some of the ...

Re: SAS vs. SPLUS vs. SAS 220046
If you are referring to matrix manipulations which can be performed employing routines made available with PROC FCMP, those routines are not an adequate substitute for a full-fledged matrix programming language. Also, I have found that the matrix routines are not really accessible in SAS/STAT procedures the way that they should be. I have brought this to the attention of SI. Their response was that they were not aware of the problems until I reported that I could not employ the matrix operations during execution of NLMIXED code. On further consideration, they determined that the...

Re: SAS vs. SPLUS vs. SAS #4
matrix is indispensible tool in implementing modern data mining algorithm, but we only have native matrix opertion capability in IML. Recently I discovered that in SAS/Base SAS/Stat, we were able to conduct several important matrix manipulations and I able to translate those prototype algorithms on textbook into SAS. I just submited a paper to SGF2010 on this topic, hope the paper can be accepted. On Fri, 11 Dec 2009 13:09:32 -0800, Paul Miller <pjmiller_57@YAHOO.COM> wrote: >Hello Everyone, >� >I’ve recently become interested in sequential clinical trials des...

Re: Death of the Mainframe? (was PC SAS vs. Mainframe SAS) #8
"If you're the VP of an IT shop and to get a good MVS guy will costs you $200K/yr because they're in short supply" Yes but this is only a problem if the business value of the installation is comparable to that which you could support with a 3 x86 guys at $65k. Per head MF support may cost more but generally speaking the total staff cost as a proportion of the value of the hardware and the business it supports - and this is far less subject to PC-style depreciation - is much lower than you would get for PC. You don't hire a two bit mechanic to service a Maybach. -----Ori...

Re: Death of the Mainframe? (was PC SAS vs. Mainframe SAS) #9
On Thu, 28 Sep 2006 08:00:18 -0600, Alan Churchill <SASL001@SAVIAN.NET> wrote: >Richard, > >You got me...on both counts. > >Alan > >Alan Churchill >Savian "Bridging SAS and Microsoft Technologies" >www.savian.net > > > >-----Original Message----- >From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Richard >A. DeVenezia >Sent: Thursday, September 28, 2006 6:03 AM >To: SAS-L@LISTSERV.UGA.EDU >Subject: Re: Death of the Mainframe? (was PC SAS vs. Mainframe SAS) > >Alan Churchill wrote: >> Paul, >...

SAS 8 and SAS 9 on the same server
I'm installing SAS 9.1.2 on a Windows 2000 server where the SAS 8 is already installed and functional. For a test period, both version should work on the same server. What's the best way to configure the Object Spawner (Integration Technologies)?? I think on these two options below: Option 1: Create one Spawner service for each SAS version. I'd have two services running on Windows, each one executing one specific version of SAS. Option 2: One only Spawner service. The Spawner file would have one entry for each SAS version. Each SAS version would be alocated on a diferent IOM por...

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+ ...

Re: Converting from SAS 5 to SAS 9 #9 641267
I did a little googling tonight and came across some SAS faqs about converting V5 files to V6. It seems that Proc V5toV6 was available on most platforms but not on the pc. However, there is supposed to be a V5 engine available that will allow SAS V6 to read a V5 file. Nat ...

Re: SAS 9.2 backward compatible with SAS 9.13 ?
--- On Thu, 1/8/09, freshforlife <ravi.taneja@GMAIL.COM> wrote: > From: freshforlife <ravi.taneja@GMAIL.COM> > Subject: SAS 9.2 backward compatible with SAS 9.13 ? > To: SAS-L@LISTSERV.UGA.EDU > Date: Thursday, January 8, 2009, 12:39 PM > Hi Guys, > > Just heard from one of our data vendors that SAS 9.2 > isn't going to be > backward compatible with SAS 9.13. This seemed bizarre to > me -- they > essentially meant that a dataset processed in 9.2 cannot be > opened in > SAS 9.13. > > Just wanted to run it through you guys and know what your > views are. > > Thanks, > Ravi Ravi, This sounds like your data vendor is trying to sell you something you may not need. I ran code in 9.2 that created a permanent SAS dataset. I then started SAS 9.1.3 and read the dataset. Here is the code that I submitted in SAS 9.2: libname temp "c:\temp"; data temp.test92to913; do i=1 to 20; y = rannor(1234579); output; end; run; proc means data=temp.test92to913; run; This generated the results: Variable N Mean Std Dev Minimum Maximum ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ i 20 10.5000000 5.9160798 1.0000000 20.0000000 y 20 -0.2290414 0.8500575 -1.7714081 1.3953167 ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ And in SAS 9.1.3, I submitte...

Web resources about - Re: PHREG SAS 8 vs SAS 9 - comp.soft-sys.sas

A Handbook of Statistical Graphics Using SAS ODS - Geoff Der, Brian S. Everitt - Google Книги
Easily Use SAS to Produce Your Graphics Diagrams, plots, and other types of graphics are indispensable components in nearly all phases of statistical ...

Resources last updated: 3/16/2016 2:36:59 PM