0

So, I have a binomial variable (S and N) and the Generalized linear model on Rcommander isnt working. Attached is a picture of the rcommander window. It is in portuguese, but the logic is the same: the 1st variable added under "splines" (on the left) is the qualitative binomial variable and the next one is another qualitative variable (and so are all of the other ones on my database) Then I click ok.

The thing is, I am getting the following errors/warnings :

RcmdrMsg: [5] ERROR: y values ​​must be 0 <= y <= 1

RcmdrMsg: [6] ERROR: Error evaluating argument 'object' in method selection for function 'summary'

Warning in sprintf(gettextRcmdr("the model %s is no longer available"), : one argument not used by format 'The model is no longer available'

RcmdrMsg: [7] ERROR: Templates are no longer available

RcmdrMsg: [8] ERROR: object 'GLM.1' not found

I´ve tried writing the script like

GLM.1 <- glm(A.demanda.foi.atendida.e.foi.no.prazo. ~ UF, family=binomial(logit), data=Tabela_Procon_última), but it isnt working either.

I would REALLY appreciate it if someone could give me an insight as to what is going on.

Thank you very much!

This is a assignment about quality control. Right now I need to see which variables really influence the response variable.

I have tried doing that by using the Generalized linear model tool on Rcommander but it didn't work. I tried typing the script:

GLM.1 <- glm(A.demanda.foi.atendida.e.foi.no.prazo. ~ UF, family=binomial(logit), data=Tabela_Procon_última)

But it also didnt work.

All of my variables are qualitative.The errors I am getting are the following:

I am getting the following errors/warnings :

RcmdrMsg: [5] ERROR: y values ​​must be 0 <= y <= 1

RcmdrMsg: [6] ERROR: Error evaluating argument 'object' in method selection for function 'summary'

Warning in sprintf(gettextRcmdr("the model %s is no longer available"), : one argument not used by format 'The model is no longer available'

RcmdrMsg: [7] ERROR: Templates are no longer available RcmdrMsg+

RcmdrMsg: [8] ERROR: object 'GLM.1' not found

thank you

Phil
  • 7,287
  • 3
  • 36
  • 66
  • 2
    What do you get when you run `summary(Tabela_Procon_última$A.demanda.foi.atendida.e.foi.no.prazo.)`? – Phil Jan 25 '23 at 01:23
  • Hi, Phill! I see this: Length Class Mode 8016 character character – Flora Rodrigues Jan 25 '23 at 01:53
  • Your variable needs to be in numeric format instead of character. – Phil Jan 25 '23 at 03:15
  • Hi, Phill! So, change from character to factor? – Flora Rodrigues Jan 25 '23 at 03:20
  • NO. While `factor(.)` stores internally as an integer, it is treated wholly as categorical (possibly ordered) data, in which case many math-like operations will still fail (worse, if they succeed, it is not always intuitive if they are working on the number as we see or the integer-index stored internally). The recommendation as for `numeric`, which means `as.numeric` in my book. – r2evans Jan 25 '23 at 13:57

0 Answers0