R, a powerful tool

From DIR
Jump to: navigation, search
Author Pujitha Gangarapu
For Dataset HCUP
All Blogs of HCUP Descriptive Stats
Introduction to Logistic Regression
R, a powerful tool


Why R of all ?

Many of the Statisticians, Health Informatics and Mangement professionals are not from the computers background. They are not well acquainted with programming skills. R doesn't actually require much of programming skills. It's easy to learn and understand. It is a free and open source project. It can be downloaded by this link. Thousands of experts have developed R packages or libraries to benefit the people who are using R today.

Focus of the blog

This blog is mainly intended for a beginner in Health Informatics and looking to gain some experience in R. I currently work under Prof. Yaorong Ge.

HCup

It is one of the largest health database in The US. In this blog, we only discuss how to start with H-CUP but the results from that are not been shown due to its legal rights. One can use SAS, SPSS or Stata to work with H-Cup data. There are readily available load programmes for that in H-cup website itself.
For the blog purpose, I took SAS to start with.
The HCup data will be in ASCII format. Following steps will demonstrate you how to convert ASCII file to CSV file format.

Creating a library:
By SAS Code:
i) Creating a library where the ascii file is located;
HCUP sas1.PNG
ii) Obtain the load program for the dataset from https://www.hcup-us.ahrq.gov

iii) Edit the load program to load the ascii file and then save it as a sas dataset by changing the path.

iv) Export the sas dataset as csv

proc	export data=mylib.work
	outfile="E:\Education\Research\RA\work.csv"
	dbms=csv replace; run;

once the csv file is formed, you can start exploring.

We can load the ASCII file directly into R.You can search the ways to do it. But it is recommended to follow the already existing methods.
Good Luck !!