Vectorisation of a variable

Hi All,

I wanted to run an ordered regression, where my outcome variable (Y) takes on the three values in descending order 3 < 2 <1.

As it stands my Y variable is a single column variable n = 9000, and with levels ranging 1-3. However, I've noticed that in some ordered settings, the dependent variable takes on vector such as in Section 4.1

Therefore, I wondered if it is possible to transform a variable into a vector of factor levels, or if prior to doing so you'd have to one-hot code the variable and then specify as a vector?

Any feedback would be appreciated

I dont understand your question.
Let's review what a data.frame is, it's a collection of vectors in relation to each other. Each vector can be conceived of in a vertical configuration, I.e columns.
A column of your frame is by definition a vector.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.