[R] varFixed
Spencer Graves
spencer.graves at pdf.com
Sun Dec 21 10:07:27 CET 2003
Can you provide a toy example including a data.frame statement
with one or more of the primary variants you have tried with the error
message(s) or other problems you encountered? You are more likely to
get a useful response if an interested reader can copy a few lines from
your email into R and test alternatives. You might answer your own
question in the process of preparing such a simple example. If not, the
result will make it easier for someone else to understand your problem
and respond. Also, have you consulted Pinhiero and Bates (2000) Mixed
Effects Models in S and S-Plus (Springer)? I was able to use "lme"
effectively only after reading the first portion of that book and
working many of their examples.
hope this helps.
spencer graves
Harold Doran wrote:
>Dear List:
>
>Earlier this week I posted a question and received no response, and I continue to struggle with my model. My original question is pasted below.
>
>I am using lme and want to fix the variance of the within group residual at 1 (e~n(0,1). I think the varFixed function should be used to accomplish this, but I am struggling to figure out how to do this.
>
>Can anyone offer suggestions on how this might be accomplished?
>
>Thanks, I would appreciate any suggestions.
>
>Harold
>
>
>Dear List:
>
>I am trying to figure out how to incorporate measurement error in an longitudinal educational data set using lme to create a "true score" model. As a by-product of the procedures used to scale educational tests, one can obtain a person-specific measurement error associated with each score, or a conditional standard error. For example, a score of 200 would have measurement error specific to that score that would be different than, say, a score of 250.
>
>I have been rather successful in figuring out how to rescale the necessary components to create this "true score" model. This simply requires that the response variable, the intercept, and any other variables in the design matrix be multiplied by the reciprocal of the standard error of measurement for the associated score. There may be a better way to do this, but I manually create a vector of 1s for all observations and multiply this vector by 1/sem. This is the new intercept. I also multiply any other predictors in the design matrix by the same value.
>
>In the R code, I remove the intercept included by default (-1) and include the newly created intercept (which is no longer a constant) as well as the new response variable and rescaled predictors.
>
>However, I am confused regarding the within-group error term. Fitting this model requires that the variance be fixed at 1: e ~ n(0,1).
>
>Is it possible to constrain the variance for this model as such?
>
>I would appreciate any comments or suggestions regarding this model.
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
>
More information about the R-help
mailing list