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

Friday, December 29, 2006

Tutorial 6:Level of significance and power of the test

The probability of making a Type I error is called level of significance (α). Normally researchers would aim to minimize the probability of making a Type I error. Most researchers will set this probability to 0.05.

The probability of making a Type II error is (β). The power of the study is calculated from (1-β) and is defined as the probability of detecting a real difference when the null hypothesis is false.

These parameters have to be predetermined by the researcher prior to the study to avert the risk of erroneously accepting the null hypothesis (even though it is really false)

Once the hypothesis, level of significance and power of the study have been fixed, the researcher can proceed to determine the statistical processes for the proper conduct and analysis of the study.

Thursday, December 07, 2006

Tutorial-5:Statistical Hypothesis

After identifying and defining the variable the researcher has to develop the hypothesis about his study if his study is an experimental study. An experimental study has two hypotheses one is null hypothesis, which is a statement of no effect or no association and the alternative hypothesis is a statement, which depicts the researcher’s interests.
Two types of errors can occur while making conclusions regarding the null hypothesis: Type I error and Type II error. A Type I error refers to rejecting the null hypothesis when the null hypothesis is true (false positive). A Type II error refers to accepting the null hypothesis when it is false (false negative).

Wednesday, November 15, 2006

Tutorial :4 Variable classification according to their nature

Variable classification according to their nature

a. Independent variables

Variables, which are either manipulated by the researcher, or variables, which cannot be controlled by the study but will affect the results of the study, are called independent variables. Age can be independent variable under study, which may affect the outcome variable such as survival in days etc

b. Dependent variables

The outcome variables under the research problem are called as dependent variables and they will be affected by the independent variables under study. The outcome variables such as no of people developed a particular disease in a cohort study

Variable classification according to their type

a. Quantitative variables

Variables, which can be measured numerically, are called quantitative variables. These variables can be further classified as continuous and discrete variables A continuous variable could take any value in an interval Examples of continuous data are body mass, height, blood pressure, and cholesterol.

Discrete variables will whole integer values. Example: number of needle punctures and number of hospitalizations


b. Qualitative variables
Variables, which cannot be measured numerically, are called qualitative variables.

Variable classification according to the scale of measurement

a. Nominal Scale variables

These variables, which are using nominal scale of measurements, can only be classified and cannot be ordered and not suitable for mathematical treatments. Variables such as gender, name etc.

b. Ordinal Scale Variables

These variables can be ordered. However, the intervals between the numbers are not necessarily equal.
Example: Star Rating for Institutions, (Institutions can be accredited with star status like 5,4,3,2,1 star ) .Here the ordering is valid as 5 Star Rated institution is superior than 4 star rated institution.But the difference between the 5 and 4 star institutions and 4 and 3 institutions is not the same even though they differ by same number one.



c. Interval Scale Variables

When Variables measured on the interval measurement scales one unit on the scale represents the same magnitude on the characteristic being measured across the whole range of the scale. i.e. the interval between the numbers are equal. In the interval scale ratio between set of two numbers in the scale are not equal.
Temperature will be a perfect example for interval scales



d. Ratio Scale Variables

Ratio scale variables will have all the properties of interval variables and also the ratio between two numbers in the ratio scales is same.Theses scales will have a true zero.Weight and height.

Saturday, November 11, 2006

Tutorial:3 Use of Biostatistical Tools in the planning stage of the research

After identifying and defining the problem clearly, researcher has decided about the type of study. Once the type of the study is decided he has to identify, classify variables before proceeding to the next step such as developing a hypothesis in case of experimental study. The variables can be classified according to their nature, type and scales of measurement i.e. independent or dependent, quantitative or qualitative, types such as nominal, ordinal, interval and ratio scales. Defining variables will have an effect on the collection and analysis part also.

Friday, October 13, 2006

Tutorial : 2. Need for Biostatistical tools

Biostatistics tools are used in research mainly because one can’t study the entire study subjects (i.e. population) because of scarcity of resources such as money, time etc. In some the research even though the resources are sufficiently available it may not feasible to conduct the research if the risk of conducting experiments on the subjects is high. When one can’t study the entire population then the he has to go for a part of the population (i.e. sample).

When the researcher studies the sample and draw inference about the population, the inference made from the sample may not be adequately represent the population and it will lead to serious error thus will defeat the purpose of the research.
Biostatistical tools help the researcher to overcome this bias and help him to draw valid conclusion about the population with defined level of confidence. Biostatistics has a role in each phase of the research .We shall start with the planning stage of research

Thursday, October 12, 2006

Tutorial 1. Introduction to Biostatistics

Biostatistics tools help the researchers to take scientific decision on the research problem they are dealing with. It role starts from the planning stage of the problem to the conclusion stage. In the current scenario at least a basic knowledge about BioStatistics is essential for the researcher to succeed in their area of research. This tutorial tries to throw light on basic concepts of BioStatistics and the areas were it could be applied meaningfully with examples.

Wednesday, October 11, 2006

Biostatistics Definition

Statistics is defined as the science of collecting, organizing, analyzing and interpreting of data. When the statistical tools applied to the biological problems it is called as BioStatistics

A tutorial on Biostatistics will come soon.

Tutorial By
Vinaitheerthan
Biostatistician
India