I was reading the documentation on R Formula, and trying to figure out how to work with depmix (from the depmixS4 package).
Now, in the documentation of depmixS4, sample formula tends to be something like y ~ 1
.
For simple case like y ~ x
, it is defining a relationship between input x and output y, so I get that it is similar to y = a * x + b
, where a
is the slope, and b
is the intercept.
If we go back to y ~ 1
, the formula is throwing me off. Is it equivalent to y = 1
(a horizontal line at y = 1)?
To add a bit context, if you look at the depmixs4 documentation, there is one example below
depmix(list(rt~1,corr~1),data=speed,nstates=2,family=list(gaussian(),multinomial()))
I think in general, formula that end with ~ 1
is confusing to me. Can any explain what ~ 1
or y ~ 1
mean?