Problem with lm adding variables

Hi, i have a problem i am trying to make linear regression on R with lm.

The problem is that for example when i do:

It gives me at results:
Coefficients: PsyT58,PsyT59,PsyT60,PsyT61,... with all the values of PsyT

I don't understand why, it should give me just 2 coefficients Intercept and PsyT.

Some values of PsyT was missing and replaced by a '.' but i filtered it and the problem is still here.

Please if you have an answer i would like to know it thank you :)!


I suspect your PsyT values are a factor. Try converting that column to numbers with as.numeric. You might have to do

mir$PsyT <- as.numeric(as.character(mir$PsyT))

Hi, and welcome!

A reproducible example, called a reprex is needed for a solid answer. Especially mir or representative data.

If you mean p-values, the . represents the 0.1 level

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