R

Calculating Confidence Interval in R

Confidence intervals (CI) are part of inferential statistics that help in making inference about a population from a sample. Based on the confidence level, a true population mean is likely covered by a range of values called confidence interval.

Dropping levels in a factor variable

Assume you have a data frame (df) for patients taking a specific drug. The data consists of a factor variable (Drug) and a numeric variable (N_patients). Drugs N_patients Drug 1 50 Drug 2 40 Drug 3 23 Drug 4 92 Drug 5 70 Later on you filter the data frame for specific levels in the factor variable and saved it in a new data frame called df1.

Shinyapp to monitor Covid-19 cases, deaths, recoveries and vaccinations

The data pertaining to cases, deaths and recoveries is pooled from Johns Hopkins University Center for Systems Science and Engineering (JHU CCSE). Vaccination data is pooled from Our world in data.

Covid-19 Vaccination Race

It took Scientists ~ 10 months to come up with the vaccine against Covid-19. Now its up to governments and people’s awareness to help eradicate the virus. For this reason this shinyapp helps monitor the vaccination status of the countries that have initiated vaccinations.

Chi-square tests

Chi-square test is a statistical method used for analysis of categorical data. There are 2 types: 1. Goodness of fit Known as: * Chi-square for 1 sample * Chi-square for given proportions

Installing older version of a package

In many situations when you install a new package, R will ask you whether you want to update a specific package in your library to the newest version. The main problem is sometimes in the updated version, a certain function might have been completely removed and thus could mess up your pre-existing code in use.