loess - Using weights for repeated cases in R (and specifically gam for binary response) -


i've noticed many r models allow "weights" parameter (e.g. cart, loess, gam,...). of functions describe "prior weights" data, mean?

i have data many repeated cases , binary response. hoping use "weights" encode how many times each combination of input , response occurs, doesn't seem work. i've tried making response proportion of successes, , weight total trials each combination of covariates, doesn't seem work either (at least gam). i'm trying of model types listed above, starters, how gam [mgcv package]?

weights binomial response have natural interpretation: number of trials corresponding each observation. if have n trials of p successes, fit with

glm(p/n ~ x, family=binomial, weights=n) 

the same works gam in both gam , mgcv packages.


Comments