How to apply pairwise deletion for missing values This method is always explained with listwise deletion which is very easy to understand. But I can't understand pairwise. Google didn't help as everywhere there is only definiton of it. 
Please explain this by taking any toy example.
 A: Listwise deletion deletes cases when any variable is missing.
Pairwise deletion only deletes cases when one of the variables in the particular model you are evaluating is missing.
One way to compare is with a correlation matrix of a set of variables that have different missing patterns.  With listwise deletion, N will be the same for every correlation - it will be the number of complete cases.  With pairwise deletion, N will vary. It will be the number of cases where both variables in the correlation are present (but other variables may be missing). 
A: One toy example is let’s say you have a dataset which contains these variables: gender, age, education, income, and political affiliation. For each case in the dataset, the values of some of the variables are more likely to be missing than others depending on the surveyee’s sensitiveness to the survey questions. 
Let’s say you are interested in knowing if there is a correlation between age and political affiliation. Using listwise deletion method, all cases with missing values on one or more variables are removed from the analysis even though the missing value says, income or education, is not needed in your computation of the correlation between age and political affiliation. Dropping the incomplete cases can produce a dramatic reduction in the total sample size.
Pairwise deletion is an alternative to listwise deletion to mitigate the loss of data. Using pairwise deletion, any given case may contribute to some analyses but not to others depending on whether the needed data are available. Hence for your analysis in this example, all cases with available data on age and political affiliation will be included regardless of the missing values for other variables like gender, income or education.
