diff --git a/R/gwr.mixed.r b/R/gwr.mixed.r index 09c81e7..bd8214e 100644 --- a/R/gwr.mixed.r +++ b/R/gwr.mixed.r @@ -118,7 +118,7 @@ gwr.mixed <- function(formula, data, regression.points, fixed.vars,intercept.fix kernel=kernel, dMat=dMat, dMat.rp=dMat.rp) res <- list() res$local <- model$local - res$global <- as.matrix(apply(model$global,2,mean,na.rm=T), 1, length(idx.fixed)) + res$global <- matrix(apply(model$global,2,mean,na.rm=T), 1, length(idx.fixed)) colnames(res$local) <- colnames(x1) colnames(res$global) <- colnames(x2) mgwr.df <- data.frame(model$local, model$global) @@ -393,4 +393,4 @@ gwr.q.fast <- function(x, y, adaptive=F, bw, colnames(betas) <- colnames(x) betas -} \ No newline at end of file +}