Skip to content
Prev 9932 / 29559 Next

multiple regression analysis

Hi,

Or, you could include additional variables into the model structure that 
describe vertical patterns. If you choose to do this, then it would also be 
wise to account for correlation between observations with depth and in space. 
Assuming that you can describe your response variable with some covariates 
that you have measured in space, I would start looking at models such as:

# this might help
library(rms)

# account for patterns in depth + covatiates:
# y is the response
# x is one of your covariates
# rcs(depth) is a set of restricted cubic spline basis functions
# that can accommodate just about any smooth shape with depth
ols(y ~ x * rcs(depth))


# you can account for correlation between observations in depth with 
# generalized least squares
# correlation structure is modeled with a continuous AR(1) process
Gls(y ~ x * rcs(depth), cor=corCAR1(form= ~ depth | bore_hole_id))


# this can be further extended to account for spatial correlation...


Cheers,
Dylan
On Tuesday, November 09, 2010, Peter Kirchner wrote: