Hello
I just started using R2MLwiN and I am replicating Zhang's et al (2016) R2MLwiN example (Page 8). I don't know why the Variance Partition Coefficient is not Printing. This is my code, and as I see here it should print the result as soon as I run it
# Variance Partition Coefficient (VPC) by pulling relevant slot "RP" -random part -of this S4 class object
print(VPC <- VarCompModel["RP"] [["RP2_var_Intercept"]] /
(VarCompModel["RP"] [["RP1_var_Intercept"]] + (VarCompModel["RP"] [["RP2_var_Intercept"]]))
And it should yield
[1] 0.1659064
What can I do?
David
VPC not printing
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: VPC not printing
We provide an example script to replicate all of the examples in this paper at:
http://bristol.ac.uk/cmm/media/r2mlwin/jss.R
along with the output when this is run:
http://bristol.ac.uk/cmm/media/r2mlwin/jss.Rout
As you can see the VPC is correctly printed here, so my suggestion would be to compare your code with this to see if you can find any differences. It might also be worth running this example code on your system to see whether your output matches that provided here.
http://bristol.ac.uk/cmm/media/r2mlwin/jss.R
along with the output when this is run:
http://bristol.ac.uk/cmm/media/r2mlwin/jss.Rout
As you can see the VPC is correctly printed here, so my suggestion would be to compare your code with this to see if you can find any differences. It might also be worth running this example code on your system to see whether your output matches that provided here.
Re: VPC not printing
Thank you I will try this asap