top of page

Different ways of fitting Van-Genuchten model on some experimental data - Part2

In this post, I will be explaining a little bit more complicated way to fitt Van-Genuchten model on some experimental data.

Basically, in this post I'm going to talk about how to use HydroMe (http://cran.r-project.org/web/packages/HydroMe/index.html) package in R.

This package has been created with the aim of giving the user ability to test different water retention and infiltration models on their data. After installing this package in your R, and calling package in your code you would be able to use its function. There two version of this package out there available for download which the first version fits just the 4 parameters version of Van-Genuchten model and the next version just the 5 parameter version.

Since I had to estimate the 4 parameters version of VGM model, I used the first version. Here is the code you can use to test package :

van.nlme1 <- nlme(y~SSvan(logx, thr, ths, alp, scal), data=curvesG2,

fixed = thr + ths + alp + scal~1,

random = pdSymm(thr + ths ~1),

start = c(thr=0.1, ths=0.45, alp=-2.2, scal=2) )

summary (van.nlme1)

anova(van.nlme1)

In this code, SSvan is the function provided by the packge in order to be as selfstarting function which estimates the water retention parameters contained in the van Genuchtens function. In addition the nlme function fits the non linear mixed effect model. There are actually few number of things I need to mention about this code :

1- In my experiment I had to just keep the 'thr' and 'ths' as mixed effect otherwise the nlme didn't converge. While you can try to see how does the results (parameters) look like when you take alp (alpha) or n as mixed effect as well.

If you have no idea what are the fixed, random or mixed effect or what's the different between them, I would suggest you to take look at this book (http://www.amazon.com/Mixed-Effects-Models-S-PLUS-Statistics-Computing/dp/1441903178).

2- You need to set the initial guess for 'alp' something with negative value, since the SSvan function wants you to input suction head in log normal form.

Warning: According to what it says in Hydrome Package ,"some datasets do perform poorly with this function".

Featured Posts
Recent Posts
Archive
Search By Tags
bottom of page