Sunday, June 17, 2018

To select a subset of a variable

To select a subset of a variable based on the categories of other variables or condition in further analysis, we can do with the following code

For example we need to get the subset of variable age based on the gender 

age = c(45,50,60)
gender = c("F", "M","F")
maleage <- age[gender == "M"]
femaleage <- age[gender == "F"]



 

Friday, June 01, 2018

Refer a column or variable of a data set in R

To refer a column or variable of a data set the following methods can be used

if patient is the data set name and it contains age, gender, height variable etc then 

age <- patient$age
age <- patient[,"age"]

To create user defined function to return more than one parameter in R package

To get all descriptive statistics for a variable we can use following r code
ds = function(x) list
(
mean = mean(x),
median = median(x),
quantile = quantile(x)
)
ds(income)

To Cite R statistical package in articles and books - Citation function in R


To Cite the r Software package we can use the citation() function in R which will give you the desired output

To cite R in publications use:

  R Core Team (2018). R: A language and environment for statistical computing. R
  Foundation for Statistical Computing, Vienna, Austria. URL
  https://www.R-project.org/.

A BibTeX entry for LaTeX users is

  @Manual{,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2018},
    url = {https://www.R-project.org/},
  }

We have invested a lot of time and effort in creating R, please cite it when using it
for data analysis. See also ‘citation("pkgname")’ for citing R packages.


Importing and Exporting data set in R


It is easy to import and export data set in R using package 'rio'


  1. install.package("rio")
  2. library(rio)
  3. ## set working directory
  4. dir1 = "path to working directory such as c://.." 
  5. setwd(dir1)
  6. data <- import("example.csv")
  7. ##The same data set can be exported to SAS dataset
  8. export(data, "example.sas7bdat")

## Some of the Supported data set are 
  1. csv
  2. xls
  3. xlsx
  4. sav
  5. sas7bdat
  6. rds

Renaming the Columns of a R data set


Syntax

names(data set name)[column number] <- "new column name"

example data set with column names

1. S.No
2. Patient Name
3. Age

names(example)(2) <- "Name"

It will change the "Patient name" into "Name"



Saturday, April 28, 2018

Tutorial on Mining of Biomedical Literature with the Help of R Package


Maximum Likelihood Estimation and Likelihood Ratio test revisited


Vinaitheerthan Renganahtan
Abstract
Maximum likelihood Estimation is an important aspect of frequentist approach which was introduced by RA Fisher [1]. Maximum Likelihood estimation method helps us to find the estimator for the unknown population parameter. There are other methods of estimation also available such as Least Square Estimation and Bayesian Estimation methods but Maximum Likelihood Estimation is the widely used method to estimate the parameters. This paper provides an overview of Maximum Likelihood Method with example to calculate a Maximum Likelihood Estimator from a sample data set.

Keywords: Maximum Likelihood, Frequentist

Tutorial on mining of biomedical literature with the help of R Package


Vinaitheerthan Renganathan 

Abstract

This paper provides step by step overview of process involved in mining of biomedical literature using R-Statistical Package. Abstract from PubMed database on a given topic are retrieved, stored, pre-processed using R programming codes. The resultant term document matrix is used to find association between terms and frequency of the terms in each document. Finally the clouds of words and clustering of documents are created using the R software to discover the association between the documents. The results from the process provided a step by step understanding of the retrieval of abstracts, pre-processing of abstracts and clustering of abstracts using the user based query term

Keywords: Biomedical, Clustering, Classification, R Software, Text mining

Friday, April 27, 2018

Text Mining in Biomedical Domain with Emphasis on Document Clustering

Vinaitheerthan Renganathan

Healthcare Informatics Research 2017 Jul; 23(03) 141-146 

Abstract
Objectives: With the exponential increase in the number of articles published every year in the biomedical domain, there is a need to build automated systems to extract unknown information from the articles published. Text mining techniques enablethe extraction of unknown knowledge from unstructured documents.
Methods: This paper reviews text mining processes in detail and the software tools available to carry out text mining. It also reviews the roles and applications of text mining in the biomedical domain.
Results: Text mining processes, such as search and retrieval of documents, pre-processing of documents, natural language processing, methods for text clustering, and methods for text classification are described in detail.
Conclusions: Text mining techniques can facilitate the mining of vast amounts of knowledge on a given topic from published biomedical research articles and draw meaningful conclusions that are not possible otherwise.

Keyword : Text Mining, Cluster Analysis, Classification, Natural Language Processing, Software

Citation: 
Renganathan, V. (2017). Text Mining in Biomedical Domain with Emphasis on Document Clustering. Healthcare Informatics Research, 23(3), 141-146. 

Overview of Frequentist and Bayesian approach to Survival Analysis Vinaitheerthan Renganathan


Applied Medical Informatics, 38(1), 25-38

Abstract

Survival analysis is one of the main areas of focus in medical research in recent years. Survival analysis involves the concept of 'Time to event'. The event may be mortality, onset of disease, response to treatment etc. Purpose of this paper is to provide overview of frequentist and Bayesian Approaches to Survival Analysis. The paper starts with the overview of the basic concepts of survival analysis and then discusses the frequentist and Bayesian approaches to survival analysis in the biomedical domain with help of hypothetical survival dataset. The survival analysis of the hypothetical data sets showed that for the specific dataset and specific hypothesis, Bayesian approach provided direct probability that the null hypothesis is true or not and the probability that the unknown parameter (mean survival time) lies in a given credible interval wherein the frequentist approach provided p-values and confidence interval for interpreting whether the null hypothesis is true or not and the percentage of intervals which will contain the parameter when the experiment is repeated under same condition. The use of Bayesian survival analysis in biomedical domain has increased due to the availability of advanced commercial and free software, its ability to handle design and analysis issues in survival model and the ease of interpretation of the research findings.
Keyword :Biostatistics,surival,overview,frequentist,bayeisan,analysis,applied,medical,informatics,journal