Dear list, I’m using the ‘mgcv’ package to fit some GAMs. Some of my covariates are derived quantities and have an associated standard error, so I would like to incorporate this uncertainty into the GAM estimation process. Ideally, during the estimation process less importance would be given to observations whose covariates have high standard errors.
The gam() function in the ‘mgcv’ package has a ‘weights’ argument. According to the package documentation, this can be used to provide prior weights to the data. This argument (as far as I understand) takes a vector of the same length of the data with numeric values higher than zero. So it seems that I should combine the standard errors of all covariates into a single vector and use it as weights. But it is not obvious to me how to do this, given that the covariates have different units and ranges of values. Is there any way to provide weights to the covariates directly (for example providing a matrix of n x m values, where n=number of covariates and m=number of observations)? Thanks, Julian Julian M. Burgos Fisheries Acoustics Research Lab School of Aquatic and Fishery Science University of Washington 1122 NE Boat Street Seattle, WA 98105 Phone: 206-221-6864 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.