0

I multiplied a specific value to a column in R (I was trying to find the relationship between a health disorder - which is in multinomial values- and NO2 levels during a specific period), and it differed the p-values of the multinom() function in the nnet package.

The vglm function in the VGAM package, in the other hand gave a consistent result but different from the multinom() function. Why could these errors potentially happen?

An example of what I did is as follows:

iris$sepallength<-with(iris, ifelse(iris$Sepal.Length<6, 0, ifelse(iris$Sepal.Length<8, 1, 2)))
#I made a new "sepal length" as a multinomial value just for examples.
iris$newpetallength<-100*iris$Petal.Length
test<-multinom(iris$sepallength~iris$newpetallength)
z <- summary(test)$coefficients/summary(test)$standard.errors
p<- (1 - pnorm(abs(z), 0, 1)) * 2
p
test2<-multinom(iris$sepallength~iris$Petal.Length)
z2 <- summary(test2)$coefficients/summary(test2)$standard.errors
p2<- (1 - pnorm(abs(z2), 0, 1)) * 2
p2

The results in p and p2 turn out to differ; in the iris example, it is a slight difference but in my dataset the difference is quite large. Why would this happen (I do not understand why p-values could differ by just multiplying a certain column) and how should I solve this?

*I used the below method in order to get the p-values. P-value in nnet: multinom() . P-value Wald test extracted, but ¿how i extract it by LIkehood ratio?

최준서
  • 1
  • 1
  • One possibility is this model is not [scale invariant](https://stats.stackexchange.com/questions/485404/what-does-it-mean-to-say-that-a-regression-method-is-not-scale-invariant) and therefore scaling a predictor varies the results. – one Aug 10 '23 at 18:18

0 Answers0