Hello friends,
I have fitted a mixed-effects model with three levels: Countries (3 countries), Participants (500 participants within each country), Questions (10 questions for different health conditions per participant). I am modelling the following model based on say 200 participants' data from each country to predict their responses to questions. In order to assess the performance of the model, I want to use the fitted model to predict responses for remaining 300 participants.
My model is:
I am using country-specific intercepts and random-effects for each of the severity levels (5 levels mo1, mo2, mo3, mo4, mo5) of health conditions described in questions, and participant-specific intercepts.
I am interested in predicting responses using all the fixed effects (constant, and _Imo_2 to _Imo_5) and their country-specific intercepts and random slopes, but ignoring participant-specific intercepts.
I tried following command in Stata to predict the responses, but it only predicts for the 200 participants' sample which was used to build the model. However, I am interested in predicting values for the remaining 300 participants' data.
Appreciate if anyone knows how I can do it. Thanks in advance.
Mihir
I have fitted a mixed-effects model with three levels: Countries (3 countries), Participants (500 participants within each country), Questions (10 questions for different health conditions per participant). I am modelling the following model based on say 200 participants' data from each country to predict their responses to questions. In order to assess the performance of the model, I want to use the fitted model to predict responses for remaining 300 participants.
My model is:
Code:
mixed response _Imo_2 _Imo_3 _Imo_4 _Imo_5 || country: _Imo_2 _Imo_3 _Imo_4 _Imo_5 || id:
I am interested in predicting responses using all the fixed effects (constant, and _Imo_2 to _Imo_5) and their country-specific intercepts and random slopes, but ignoring participant-specific intercepts.
I tried following command in Stata to predict the responses, but it only predicts for the 200 participants' sample which was used to build the model. However, I am interested in predicting values for the remaining 300 participants' data.
Code:
predict response, fitted relevel (country)
Mihir
Comment