Can anyone familiar with nlme
kindly explain how does the varIdent
, with option fixed actually work?
Documentation says:
fixed....an optional numeric vector, or list of numeric values, specifying the values at which some or all of the coefficients in the variance function should be fixed.
What is coefficient in variance function to be fixed? Is it something like variance=kx, where k is the coefficient and x predictor, or variance itself is to be fixed (then it would be strange to use 'coefficient of variance function', unless variance function would be something like varCov=kI, where I is identity matrix).
What I really want to do is to fit a model, where variance is pre-set, a priori known for each value of outcome and was wondering if I can use varIdent
for this purpose.
EDIT: after consulting some literature I understand now that varIdent
models variance as var=k*var1, where var1 is variance of reference level of given predictor and option 'fixed' allows to pre-specify the values of the coefficient.
Now I would like to know if I can use varIdent
also to model a priori known, exact values of variances associated with observations of continous outcome at different values of continous predictor, that is, use it to incorporate measurment error in the model.
For example, I have measurments Yobs with SDs ysd, what about model:
gls(Y~X, weights=varIdent(ysd), data=data) ?
Can anyone help?