Hi,
I have another question about graphing the level 2 variance for a random slope cumulative logit model. I was reading https://www.cmm.bristol.ac.uk/forum/vie ... 9477ba83f4 and it was mentioned that one way to do this would be to create a new dataset, then pass this dataset to the predict fucntion with the newdata parameter. Since the post was from last year, I would like to know if this option works with the current version of R2MLwiN? If yes, how does it actually work? I am quite new to R, that's why I am a little bit lost.
Thanks again.
Regards,
Vivian
Graphing level 2 variance for random slope cumulative logit model
-
- Posts: 30
- Joined: Tue Apr 12, 2016 10:54 am
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Graphing level 2 variance for random slope cumulative logit model
Creating predictions with new datasets should now work. To do this you create a data frame with the same variables names as the data used to fit the model and then put the name of this data frame as the newdata parameter of the predict command.
As you are trying to plot the variance I would suggest that you instead look at chapter 7 of the MLwiN user's guide, along with the R replication materials (http://www.bristol.ac.uk/cmm/media/r2ml ... ide07.Rout), as this gives examples of plotting variance functions.
As you are trying to plot the variance I would suggest that you instead look at chapter 7 of the MLwiN user's guide, along with the R replication materials (http://www.bristol.ac.uk/cmm/media/r2ml ... ide07.Rout), as this gives examples of plotting variance functions.
-
- Posts: 30
- Joined: Tue Apr 12, 2016 10:54 am
Re: Graphing level 2 variance for random slope cumulative logit model
Thanks, I will have a try!