[Mediation-information] Extension of Mediation package to lme models
Mieke Goos
Mieke.Goos at ppw.kuleuven.be
Tue Feb 14 12:48:54 CET 2012
Dear list members,
As I noticed that some other people (Bo and Sun) are also longing for the R code of Mediation to be extended to handle hierarchical data, I did my very best to add some lines to the R source code, in order for Mediation to work with lme models too. At least, I tried, as I am a school psychologist, and not so much a stat programming hero. Unfortunately, I don't seem to be very succesful (well, I don't blame myself, I am not an expert as many of you are) and I was wondering whether any of you has some ideas on the reasons for the following error message to appear when I use my revised package with my data:
> Model4=mediate(Model1, Model2, sims=1000, boot=FALSE, treat="graderetention", mediator="peerrelationship", conf.level=.95, dropobs=TRUE)
Error in as.data.frame.default(x) :
cannot coerce class 'c("lmeStructInt", "lmeStruct", "modelStruct")' into a data.frame
I have added in Attachment the jEdit file and the tarball file. Lines I added are 43-44; 83; 95-99; 268-272; 278-282; 407-408; 699-700.
Bo and Sun, did you perhaps succeed in extending the R code succesfully?
Any advice would be appreciated.
Kind regards,
Mieke
------------------------------------------------------------------------------------
Mieke Goos
Centre for Educational Effectiveness and Evaluation
Catholic University of Leuven
Dekenstraat 2
VHI 02.45
3000 Leuven
Belgium
Tel: (+32)(0)16/32.58.14
email: mieke.goos at ppw.kuleuven.be
url: http://www.steunpuntloopbanen.be/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/mediation-information/attachments/20120214/492ae51a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mediate.R
Type: application/octet-stream
Size: 62702 bytes
Desc: mediate.R
URL: <http://lists.r-forge.r-project.org/pipermail/mediation-information/attachments/20120214/492ae51a/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mediationplus_1.0.tar.gz
Type: application/x-gzip
Size: 41210 bytes
Desc: mediationplus_1.0.tar.gz
URL: <http://lists.r-forge.r-project.org/pipermail/mediation-information/attachments/20120214/492ae51a/attachment-0001.bin>
More information about the Mediation-information
mailing list