Why is there only a single coefficient for a categorical variable?

In this video, we solve the mystery of why there is sometimes only one coefficient for a categorical variable in the results of a multiple regression model. When things work as expected, there are 3 coefficients or lines in the results, for a variable with 4 categories (one is kept as the reference or base). If the computer treats a categorical variable as if it were a continuous one, we will only get one coefficient. The solution is to tell the computer that the variable is categorical; in R we could use as.factor(), or we could use strings rather than numbers.

Could not connect to SciFlow

In the past few days, I could not log into SciFlow:

Something went wrong.
No session found

Please try again. If the problem persist, please reach out to
support@sciflow.net.

Well, I did contact the excellent customer service, and it turns out that they tweaked their cookie settings. Which simply means: clear out your SciFlow cookies, and keep writing!

Error: `quantile.haven_labelled()` not implemented.

Today I got an Error: `quantile.haven_labelled()` not implemented on a database imported into R via library(haven) when trying to see the results of a simple linear regression model. What I needed was the zap_labels() function, which strips the value labels (and user-defined NA). Then I run the model on the new dataset, and all was good.

dataset2 = zap_labels(dataset)

R-Forge: File ‘/pkg/DESCRIPTION’ is out of date

I came across a puzzling “File ‘/pkg/DESCRIPTION’ is out of date” error when updating an R-package of mine on R-Forge today. I was pretty sure the version number and date were correct. I couldn’t figure out any other issue, so I made a copy of my documents, checked out the code again, and copied the modified files back. All worked. I’m still a bit puzzled as I only use one machine for this, but who cares if the code is working…

brms and mice

The excellent R package brms works well with multiple imputations from the excellent R package mice. Today I ran across “Error: Argument ‘data’ must be coercible to a data.frame.” and I couldn’t find anything on the web. As is usually the case, this was a silly error on my side: I used brm(…) instead of brm_multiple(…).