importing NPDB

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

importing NPDB

alisonm
Does anyone have information about using the National Practitioner Data Bank (NPDB) in R? It's public use data available from the U.S. Department of Health and Human Services that can be downloaded as a .dat or .por file. I can't even figure out how to open the file in R.
        [[alternative HTML version deleted]]


______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: importing NPDB

Marc Schwartz-3

On Dec 27, 2011, at 4:55 PM, alison korte wrote:

> Does anyone have information about using the National Practitioner Data Bank (NPDB) in R? It's public use data available from the U.S. Department of Health and Human Services that can be downloaded as a .dat or .por file. I can't even figure out how to open the file in R.

The files that are available from:

  http://www.npdb-hipdb.hrsa.gov/resources/publicData.jsp

are either tab delimited ASCII files (.DAT) or SPSS (.POR) files.

For R, you would want to use the former and import the files using ?read.delim, which defaults to using a '\t' (TAB) character as the delimiter. See the R Data Import/Export manual for more information:

  http://cran.r-project.org/manuals.html

Technical details about the file structure are available in:

  http://www.npdb-hipdb.hrsa.gov/resources/reports/PublicUseDataFile-DAT-Format.pdf

BTW, that took about two minutes of searching using Google.

HTH,

Marc Schwartz

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: importing NPDB

Clint Bowman
In reply to this post by alisonm
Alison,

library(foreign)
ndpb<-read.spss("NPDB1107.por")

generates:

Warning message:
In `levels<-`(`*tmp*`, value = c("Self Query Processing", "Non-Fed.
Malp. Payor",  :
   duplicated levels will not be allowed in factors anymore

and summary(ndpb) does generate quite a list.

Perhaps you can take it from there.

Clint

--
Clint Bowman INTERNET: [hidden email]
Air Quality Modeler INTERNET: [hidden email]
Department of Ecology VOICE: (360) 407-6815
PO Box 47600 FAX: (360) 407-7534
Olympia, WA 98504-7600


         USPS:           PO Box 47600, Olympia, WA 98504-7600
         Parcels:        300 Desmond Drive, Lacey, WA 98503-1274


On Tue, 27 Dec 2011, alison korte wrote:

> Does anyone have information about using the National Practitioner Data Bank (NPDB) in R? It's public use data available from the U.S. Department of Health and Human Services that can be downloaded as a .dat or .por file.?I can't even figure out how to open the file in R.
> [[alternative HTML version deleted]]
>
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.