The hier.part package was installed along with Gtools (which is also needed see

*).
*

HTML:

`http://cran.r-project.org/web/packages/hier.part/hier.part.pdf`

I have converted my dataset to a .csv file with seven independent variables and one dependant variable with around 400 replicates (my intention is to do this analysis on eight datasets in total with different amounts of replicates and another dependant variable, but I am starting with this one). The dependant variable is GPP, the independent variables are, NDVI, Temperature, Precipitation, Solar Radiation, Nutrient Availability and Soil Available Water Capacity.

Secondly I imported the .csv file into R using the script

GPPANDDRIVER<-read.table("C:\\etc,header=T,sep=",")

This works fine and I can edit the table using

edit(GPPANDDRIVER).

After looking at the hier.part package documentation available here http://cran.r-project.org/web/packages/hier.part/hier.part.pdf it seems like I need to define Y which in the script bellow is the dependant variable and define xcan which is the independent variables (mentioned before).

hier.part(y, xcan, family = "gaussian", gof = "RMSPE", barplot = TRUE)

I was defining the dependant y vector as

y<-as.vector(GPPANDDRIVER["GPP"])

This also works fine and I have my y vector. However I am not sure how to load independent variables onto the xcan dataframe part of the script. I have tried typing in two scripts but they have not worked.

**......AND**

xcan<-as.vector(GPPANDDRIVER[-GPP])

xcan<-data.frame(GPPANDDRIVER[-GPP])

If anyone could help me find the right script for representing my independant variables as xcan that would be greatly appreciated. Also once defined if I entered in the hier.part script mentioned above would R then show me results of the analysis after processing? I will be moving onto to the regression analysis after this if anyone can shed some light on this first problem.

Thanks for your patience

information on hier.part arguments.

y a vector containing the dependent variables

xcan a dataframe containing the n independent variables

family family argument of glm

gof Goodness-of-fit measure. Currently "RMSPE", Root-mean-square ’prediction’

error, "logLik", Log-Likelihood or "Rsqu", R-squared

print.vars if FALSE, the function returns a vector of goodness-of-fit measures. If TRUE, a data frame is returned with first column listing variable combinations and the

second column listing goodness-of-fit measures.

**Arguments**y a vector containing the dependent variables

xcan a dataframe containing the n independent variables

family family argument of glm

gof Goodness-of-fit measure. Currently "RMSPE", Root-mean-square ’prediction’

error, "logLik", Log-Likelihood or "Rsqu", R-squared

print.vars if FALSE, the function returns a vector of goodness-of-fit measures. If TRUE, a data frame is returned with first column listing variable combinations and the

second column listing goodness-of-fit measures.