I am using a mixed-effect linear model and I want to plot the coefficient of the main independent variable against the outcome variable. Below is the model that I ran. This is one regression model out of many other models for different outcome variables and this construct of covariates seems the most parsimonious one (I have tested the model fitting for all the models). Now I want to create a regression coefficient plot that would be a two-way graph with a scatter plot along with the coefficient plot. I have checked the [coefplot] command but I am preferring a line diagram instead of a forest plot. I would be grateful if you could assist me. below is the result of my analysis.
HTML Code:
Performing EM optimization: Performing gradient-based optimization: Iteration 0: log likelihood = -610.4117 Iteration 1: log likelihood = -609.88061 Iteration 2: log likelihood = -609.88034 Iteration 3: log likelihood = -609.88034 Computing standard errors: Mixed-effects ML regression Number of obs = 216 Group variable: Interval Number of groups = 78 Obs per group: min = 1 avg = 2.8 max = 12 Wald chi2(6) = 80.96 Log likelihood = -609.88034 Prob > chi2 = 0.0000 rv_tlc Coef. Std. Err. z P>|z| [95% Conf. Interval] PC .3898496 .2800982 1.39 0.164 -.1591329 .938832 gender Female 1.119768 .6264817 1.79 0.074 -.1081135 2.347649 age .2764968 .0330719 8.36 0.000 .2116771 .3413165 bmi -.0892654 .0533956 -1.67 0.095 -.1939188 .015388 race Others -.8500946 1.398114 -0.61 0.543 -3.590347 1.890158 pack_years -.0717252 .0866186 -0.83 0.408 -.2414946 .0980442 _cons 14.27193 2.021221 7.06 0.000 10.31041 18.23345 Random-effects Parameters Estimate Std. Err. [95% Conf. Interval] Interval: Identity var(_cons) .6608308 .9796505 .0361596 12.07693 var(Residual) 15.98341 1.754463 12.88947 19.82001 LR test vs. linear model: chibar2(01) = 0.59 Prob >= chibar2 = 0.2211
Graph.gph
0 Response to How to create a graph from mixed effect linear coefficient
Post a Comment