AICc and K for categorical factors and interactions I am new to multimodel inference. I am trying to create a model that has multiple categorical factors and possible interactions. For example say that my model is...

Y ~ X1 + factor(X2) + factor(X3)

say each factor has two possible categories. R is only giving me AIC in my summary output. When calculating AICc would K be 3 or 5?
also, if I have a potential interaction as in...

Y ~ X1 * X2 + X3

would K be 3 or 4? Also what do I do if there is an interaction? Do I just stop there or can I continue with analysis leaving the interaction term in the model.
 A: Strictly, "none of the above".
I assume that in your question, $K$ is defined the same as $k$ here.
Every parameter that is in the model counts. So for every level of a factor (above the first), add one. For every factor-level-by-factor-level interaction term that has a parameter estimate, add one. And add one for the intercept and another one for the estimate of $\sigma^2\,$!
When comparing raw AICs it doesn't matter if some parameters are omitted from every model (so if two models both fail to count $\sigma^2$ it wouldn't matter, since it won't change the difference in AIC), but it does matter for AICc; you have to count properly there.

As is explained in the help on R's AIC function, that function will give you the df (i.e. $K$) if you supply it with more than one model:
 carsfit=lm(dist~speed,cars)
 carsfitf=lm(dist~cut(speed,seq(0,max(speed),5)),cars)
 AIC(carsfit,carsfitf)
         df      AIC
carsfit   3 419.1569
carsfitf  6 428.5270

Note 3 df for a linear regression (intercept, slope, variance).

