[R] GLM problems.

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Mar 1 20:04:05 CET 2007


Daniel Jimenez wrote:
> Dear R users I'm new in R management and maybe It's a silly question. I'm
> working with GLM to obtain predictive models. I have some problesm 
> with the
> prediction instruction:
>
>
>
>> DatosTotal <- read.csv("Var_perdizcsv.csv", sep =";")
>> edvariable <- edit(DatosTotal)
>> pre <- predict(rlfinal, DatosTotal, type = 'probs')
> Erro en match.arg(type) : 'arg' should be one of link, response, terms
What is unclear about that? From help(predict.glm):

    type: the type of prediction required.  The default is on the scale
          of the linear predictors; the alternative '"response"' is on
          the scale of the response variable.  Thus for a default
          binomial model the default predictions are of log-odds
          (probabilities on logit scale) and 'type = "response"' gives
          the predicted probabilities.  The '"terms"' option returns a
          matrix giving the fitted values of each term in the model
          formula on the linear predictor scale.



More information about the R-help mailing list