Dear community,
I would like to create a two-way plot of two continuous variables. STATA's fit plots offer an intuitive way to facilitate visualisation of a univariable linear regression.
I was wondering whether this option exists also for multivariable linear regression, or otherwise how to best solve this.
So far, I have tried to run my weighted multivariable linear regression equations and create linear predictions for subsequent utilization in STATA's twoway command:
regress dep_var indep_var conf1 conf2 conf3 [aweight=indep_var]
predict dep_var_prediction
scatter dep_var indep_var || dep_var_prediction indep_var, sort
This approach yields a wiggly line if plotted against the independent variable (Screenshot 1). This is in contrast to the straight line that is plotted if linear predictions are made based on the crude linear regression model (Screenshot 2) i.e. ...
regress dep_var indep_var[aweight=indep_var]
predict dep_var_prediction_crude
Is it possible to produce a plot with a straight line based on the multivariable regression equation? I am certain that the solution might probably be very obvious, yet I have been unable to see it. Many thanks for any advice in advance.
Best wishes,
HannesArray Array
Related Posts with Fit plots based on multivariable linear regression
How to obtain goodness of fit statitics after running a biprobit model with svy prefixAre there any ways to obtain goodness of fit statistics after running a biprobit model with svy pref…
Interrupted time series - negative "constant"I'm trying to run a Interrupted time series analysis for single group using the "ITSA" package Code…
Standardized beta estimates for interaction terms in mixed effect modelsDear Statalist, I am using mixed-effects to run the below model, but wondering how to get the stand…
clustered standard errors or just robust? panel dataHi there, I have to use an event study methodology to estimate the impact of the event (child birth…
Calculate percentage for similar entriesHi all, I have the following table where I want to generate the variable "board_independence". The…
Subscribe to:
Post Comments (Atom)
0 Response to Fit plots based on multivariable linear regression
Post a Comment