title: How to perform logistic regression on not binary variable?
body: <p>I was searching for this answer and I'm really suprised that haven't found it. I just want to peform three level logistic regression in R.</p>
  <p>Let's define some artificial data:</p>
  <pre><code>set.seed(42)
  y &lt;- sample(0:2, 100, replace = T)
  x &lt;- rnorm(100)
  </code></pre>
  <p>My variable <code>y</code> is containing three numbers - 0, 1 and 2. So I thought that the simplest way would be just to use:</p>
  <pre><code>glm(y ~ x, family = binomial(&quot;logit&quot;))
  </code></pre>
  <p>However I got information that <code>y</code> should be in interval [0,1]. Do you know how I can perform this regression ?</p>
  <p>Please notice - I know that it's not so straightforward to perform multilevel logistic regression, there are several techniques how to do so e.g. One vs all. But as I was seeking for it, I wasn't able to find any.</p>