The ‘-’ operator removes the specified terms, so that ‘(a+b+c)^2 - a:b’ is identical to ‘a + b + c + b:c + a:c’. It can also used to remove the intercept term: when fitting a linear model ‘y ~ x - 1’ specifies a line through the origin. A model with no intercept can be also specified as ‘y ~ x + 0’ or ‘y ~ 0 + x’.
y ~ 1includes an intercept
y ~ 0does not include an intercept
y ~ -1does not include an intercept
The last two are functionally equivalent.
CLICK HERE to find out more related problems solutions.