I'm running a multivariate gls model:

m <- gls(y ~ x + factor1 + factor2, cor = corPagel(1,phylogeny), weight= ~1/log(n))

I want to plot the results and I could get predicted values like this:

newdata <- data.frame(expand.grid( x = mean(x), factor1= unique(factor1), factor2 = unique(factor2)))

predvals <- predict(m,newdata)

Although two of the variables I want to plot are factors, and I want to get confidence intervals or standard errors for these predicted values.

Does anyone know how to do it?

Thanks in advance for your help! Cheers, Jasmine

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top