Tuesday, June 23, 2009

SAS REPORTER: Download SAS ebooks,certification questions and other study material

NOTE-->ACCESS TO THIS LINK IS BY INVITATION ONLY.PLEASE LEAVE YOU MAIL-ID AND YOU WILL RECEIVE AN INVITATION TO ACCESS THE LINK.
THANK YOU.

SAS REPORTER: Download SAS ebooks,certification questions and other study material
NOTE-->ACCESS TO THIS LINK IS BY INVITATION ONLY.PLEASE LEAVE YOU MAIL-ID AND YOU WILL RECEIVE AN INVITATION TO ACCESS THE LINK.
THANK YOU.

How To Remove Duplicate Records In A Dataset?



Lets create a dataset-m arks

/*reading dataset from external file in temporary libary*/
data marks;
infile 'c:\users\bobby\desktop\marks.txt';
input id gender$ marks_m1 marks_m2;
/*sending output*/
proc print;
run;

sas output of the dataset marks is—

id gender marks_m1 marks_m2

1 m 50 50
1 m 50 50
2 f 60 65
2 f 70 70
3 f 80 70
3 f 90 70
3 f 80 80
4 m 85 60
5 m 90 60
5 m 90 90
5 m 70 100
6 f 75 80
6 f 75 80
7 m 80 80
8 m 90 70
9 m 90 70
9 m 90 80
10 f 60 70
10 f 90 80

As you can see that there are duplicate records in the dataset.few records are identical (all values same) while others with id but other values different.let us see how we can eliminate them…



/*eliminating duplicate records*/
/*using nodupkey options*/
proc sort data=marks out=no_dup nodupkey ;
by id;
run;
/*using dupkey option of proc sort deleted duplicate observations/records with same key
variable/by variable*/

proc print data=no_dup noobs;
run;


output of no_dup dataset—



id gender marks_m1 marks_m2

1 m 50 50
2 f 60 65
3 f 80 70
4 m 85 60
5 m 90 60
6 f 75 80
7 m 80 80
8 m 90 70
9 m 90 70
10 f 60 70

We have used the nodupkey option of proc sort which deleted records with same value of key variable(id in this case).

Now ,there is other option to eliminate duplicate rows ..
The ‘noduprecs’ option ….this option is useful when we want to delete identical records.

proc sort data=marks out=no_dup noduprecs ;
by id;
run;


id gender marks_m1 marks_m2

1 m 50 50
2 f 60 65
2 f 70 70
3 f 80 70
3 f 90 70
3 f 80 80
4 m 85 60
5 m 90 60
5 m 90 90
5 m 70 100
6 f 75 80
7 m 80 80
8 m 90 70
9 m 90 70
9 m 90 80
10 f 60 70
10 f 90 80



/*in the output we see that there are still observations/records with duplicate keyword
,this is where noduprecs differs from nodupkey.
nodupkey eliminates records where it detects repeated by varialbe value whereas noduprecs
deletes only identical records i.e where all values are exactly the same*/


*warning when using nodeprecs*/
/*though noduprecs deletes records with identical values but still there are cases when it
deviates from its normal working...let us see in the following example--*/..

the given dataset is…


id height weight

1 123 45
1 124 56
1 123 45
1 125 68

Two records are identical.to remove second record we use nodeprecs option..the output is…

Obs id height weight

1 1 123 45
2 1 124 56
3 1 123 45
4 1 125 68

/*here in the output you can see the duplicate still exists,this is where you need to be cautious,
thing to remember is that noduprecs deletes only successive duplicates .*/
one way to solve this situation is to consider more than one variable in by statement to make sure that identical records are successive.

Monday, June 22, 2009

SAS:Concepts And Questions

Question1:-

HOW TO OBTAIN LAST N OBS FROM A SAS DATASET IF WE DON'T KNOW THE NUMBER OF OBS..?

Sol-:
If you want to obtain last 5 obs (or n obs) then here is a simple way of doing -

data last_five;
set input_data nobs = t_obs;

if _n_ gt (t_obs - 5) then output last_five;

run;
(first answered by-anonymous,SAS orkut community)

Question2:-
WHAT IS THE AUTOMATIC VARIABLE _N_ DOES IN SAS?

A)COUNTS THE NUMBE OF OBSERVATIONS IN DATASET
B)COUNTS THE ITERATIONS OF DATASTEP

Sol-:
viks only (b) is always correct. some time no. of iterations of datastep is equal of no. of observations in dataset.

let see this code......

data madhur;
input ......; /* team is third variable in datalines*/

datalines;
1023 David red 189 165
1049 Amelia yellow 145 124
1219 Alan red 210 192
1246 Ravi yellow 194 177
1078 Ashley red 127 118
1221 Jim yellow 220 .
;

proc print data=madhur;
run;

u see in this code output dataset (madhur) will have 6 observations and datastep also iterate 6 times to write these 6 observations into output dataset madhur.

now see same code with subsetting if statement.


data madhur;
input ......; /* team is third variable in datalines*/
if Team='red';

datalines;
1023 David red 189 165
1049 Amelia yellow 145 124
1219 Alan red 210 192
1246 Ravi yellow 194 177
1078 Ashley red 127 118
1221 Jim yellow 220 .
;

proc print data=madhur;
run;

u see in this code output dataset madhur will have 3 observations ( due to subsetting if statement ) but datastep has to iterate 6 times to select 3 observations ( for which the values of team is red ).

(first answered by-manu,SAS orkut community)


Question3:-
CAN U TELL THE OUTPUT OF THE FOLLOWING CODE-

Data Data1;
Test='X';
Select(Test);
When('Y') Name='Viks';
When('X') Name='Viks@Home';
When('Z') Name='Other';
Otherwise Name='Unknown';
End;
Run;

What Is The Reason For This Output?
Plz Answer Without Running In Sas...U May Chk In Sas After U Answer.

Sol-:
without running i guessed the answer to be : 'viks@home'

but length of variable screwed up the answer. coz a statement before that (when('y)) set the length to be $4. in the same statment if u use [ length name $10. ] u will get name='viks@home'.

(first answered by-Varun Joshi,SAS orkut community)

Question4:-
write code to reverse order of observations in a dataset.
e.g. if a dataset has following observations:
ID Name color height weight
---------------------------------
1023 David red 189 165
1049 Amelia yellow 145 124
1219 Alan red 210 192
1246 Ravi yellow 194 177
1078 Ashley red 127 118
1221 Jim yellow 220 .

output should have David at last and Jim in first place. (assume data is not sorted in any key: means don't use descending sort)


Sol-:
data raw;
srt_var=_n_;
input id name$ color$ height weight;
datalines;
1023 David red 189 165
1049 Amelia yellow 145 124
1219 Alan red 210 192
1246 Ravi yellow 194 177
1078 Ashley red 127 118
1221 Jim yellow 220 .
;
run;

proc sort data=raw out=rev(drop=srt_var);by descending srt_var;run;

proc print data=rev noobs;run;

(answered by-Varun Joshi,Sas orkut community)

Saturday, June 20, 2009

Career in Clinical Research


source-TIMES OF INDIA(ASCENT/FEATURES)
BY-PRUYA NAIR
Posted On Wednesday, June 10, 2009 at 04:34:20 PM

India is fast becoming the global hub of clinical research opening up newer avenues for science graduates in this field. Here’s a look at what it takes to enter into this promising sector


Clinical research is a systematic study of the effects, risks, efficacy and benefits of a new drug. These studies are conducted at various stages both prior to the launch of a medicine in the market and after the launch of a new medicine to monitor safety and side effects of it. And, in India, clinical research sector is on a high growth path with huge spends coming in from developed countries. According to an estimation study by McKinsey, European and US pharmaceutical companies will spend US $1.5bn per year on clinical trials in India by the year 2010.


“A good knowledge about clinical practices and regulatory issues and good management and communication skills are also important for a clinical research professional," - D Saharsh Rao, president, Contract Research, Neuland Laboratories Limited
Many factors make India a popular destination for clinical research. “Well-trained medical communities that meet the global standards, huge patient base, large and fast growing private healthcare sector, state-of-the-art hospital facilities, lower costs for conducting trials, diversity in gene pool etc are few factors favoring clinical research,” explains D Saharsh Rao, president, Contract Research, Neuland Laboratories Limited.

Opportunities galore

According to experts, there are many opportunities waiting to be explored in this field. “Important clinical research outsourcing works happening in India are in the field of regulatory services, pre-clinical services, laboratory services, biometric services, drug interaction, proof of concept, conducting phase II – IV clinical trials on new medical interventions in various therapeutic areas such as infectious diseases (including Malaria & Typhoid fever), Oncology (breast cancer), cardiovascular diseases (hypertension, heart failure), psychiatry, respiratory diseases (asthma, bronchitis) and metabolic diseases (osteoporosis),” explains R Chelvi, Director, Mithas Labs Clinical Trials Research Foundation Pvt Ltd.

When many industries across sectors are reeling under the pressure of economic recession, the recession has not had much affect on clinical research. According to industry experts the industry is on a high growth path and it would require around 50000 professionals by 2010.

Job opportunities in this sector are as Clinical research Associates, Clinical research co-coordinators, Project managers, Principal investigators, Laboratory analysts, Clinical data Managers, Data Archivist, Quality Assurance/Quality Control, Medical writers, Data entry operators, SAS analysts, Biostatisticians etc. Also, there are opportunities in human resources, finance and business development in this sector.

Do you have it?

So what are the essential requirements to get into this growing sector? Dr Shilpa S Puthran, HOD – Clinical Research & Immunochemistry, Metropolis Health Services (India) Ltd explains a graduate in science or a medical professional can enter into clinical research. “A certificate or diploma in clinical research from any recognised institute including Institute of Clinical Research (ICRI), Clinical Research Education and Management Academy (CREMA), Manipal institute of clinical research etc can add more value,” adds Puthran. Adding to it Rao says, “A good knowledge about clinical practices and regulatory issues and good management and communication skills are also important for a clinical research professional.”

Lack of experience is not a barrier to seek a career in this sector as many organisations absorb freshers and provide them on the job training to make them competent enough. Taking advantage of the cost effectiveness and competent work force an increasing number of multinationals are outsourcing their clinical trials to India, making a career in clinical research a safe bet for many aspirants.

Sunday, June 7, 2009

Download SAS ebooks,certification questions and other study material

visit the following webpage for sas ebooks,certification materials.you can leave ur comments if u did not find the book you were looking for.
http://fb.esnips.com/web/bobbytobbysStuff

Send link to --

TopBlogDir.blogspot.com button Education Blog Directory Academic,  Learning & Educational Blogs - Blog Catalog Blog Directory SEO Court Directory myblog Visit blogadda.com to discover Indian blogs Add to Technorati Favorites Subscribe with Bloglines DigNow.net

Join My Community at MyBloglog!

Free Web Directory - Add Your Link
The Little Web Directory
Monster Directory A List Sites