applied statistics

Fitted vs predict in R

There are two functions in R that seems almost similar yet different: fitted() predict() First let’s prepare some data first. # Packages library(dplyr) # Data set.seed(123) dat <- iris %>% mutate(twoGp = sample(c("Gp1", "Gp2"), 150, replace = T), #create two group factor twoGp = as.

Stepwise selection after multiple imputation

Some note I have written two post previously about multiple imputation using mice package: A short note on multiple imputation Variable selection for imputation model in {mice} This post probably my last post about multiple imputation using mice package.

Variable selection using genetic algorithm

Background Genetic algorithm is inspired by a natural selection process by which the fittest individuals be selected to reproduce. This algorithm has been used in optimization and search problem, and also, can be used for variable selection.

Variable selection for imputation model in {mice}

Some note I have written a short post about missing data and multiple imputation in mice package previously. This post will add to that previous post. Imputation model Imputation model is the model that we use for our imputation approach.

A short note on multiple imputation

Background Missing data is quite challenging to deal with. Deleting it may be the easiest solution, but may not be the best solution. Missing data can be categorised into 3 types (Rubin, 1976):