Page 1 of 1

VPC not printing

Posted: Fri Feb 15, 2019 1:45 pm
by dcanarteg
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

Re: VPC not printing

Posted: Fri Feb 15, 2019 7:41 pm
by ChrisCharlton
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.

Re: VPC not printing

Posted: Fri Feb 15, 2019 9:02 pm
by dcanarteg
Thank you I will try this asap

Re: VPC not printing

Posted: Sun Feb 17, 2019 1:30 am
by dcanarteg
I fixed it. Thanks