How to make a GLM with different sample n?

Asked

Viewed 54 times

0

I want to correlate the variable number of leaves of the plant with the variables: temperature, root size, sun incidence, relative soil humidity and others. Only I have some NA in almost all independent variables and I don’t want to exclude the lines with NA because my sample "n" will become small. Is there any way to make a GLM with n different samples?

  • 1

    No, I believe there is no way. See the argument na.action in help('glm') for various ways of dealing with values NA.

  • Thank you. I will look yes

  • 1

    Cannot run traditional Glms with ns different. There are ways to deal with this, depending on what your data looks like, but this is outside the scope of Stack Overflow (the questions here should be specific about programming). If you can read and write in English, ask Cross Validated, the Stack Exchange website aimed at statistical analysis.

  • thanks for the tip.

1 answer

3

It is not possible. A generalized linear model is the relationship between the response vector Y and the outline matrix X represented in the formula below:

inserir a descrição da imagem aqui

By definition, X cannot have missing data. This is due to the fact of estimating the parameter vector beta be defined by maximizing the likelihood of the data, which depend directly on the data being complete. That is, if there are missing data, it is not possible to estimate the parameters of the model and the respective standard errors, which makes it impossible to perform the appropriate inferences.

  • Thanks. What do you recommend me in this case? as I have already said if I withdraw the NA’s I get n small sample. Is there any other statistical test I can use?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.