# two-way anova when lacking one observation

I want to perform a two-way ANOVA in a data frame that lacks one observation.

I have values for each (month,year) pair, and I am performing a two-way ANOVA to check if moving seasonality exists.

There is one value missing for a given (month,year).

My question is theoretical: whether the two-way anova test can still be performed. All formulas I find is for a full matrix.

Consider:

Consider also the case when the table from the same page had a NA instead of that observation:

For instance, the total formula no longer makes sense: $SST=\sum_{i=1}^a\sum_{j=1}^n(y_{ij}-\bar{y})^2$, where $a$ is the number of rows and $n$ is the number of columns. It does not work because there are "holes" in the matrix.

Is there any reference that discusses my case? I guess I can tweak the formulas, and R seems to work fine with NAs, but I would like to know how such things affects the degrees of freedom for example ...