Greetings!
I am trying to fit a multilevel regression model for 1,208 households nested in neighborhoods, with 20 neighborhoods (the level-2 N is, admittedly, on the low end) in Stata 15.1. The dependent variable is total outdoor water use for an entire year. The independent variables are income (dichotomous: $75,000 or above vs. less than $75,000) and the average cost of outdoor water use for each household. Given prior research, which has indicated a linear-log (or log-log, given the fact that household water use data are typically positively skewed) relationship between average cost and outdoor water use, and the fact that the AIC/BIC are drastically reduced by using the log transformed version of the cost variable (regardless of the model), I would like to use the log transformed version of cost in my model. I include an income-cost interaction to test the hypothesis is that lower-income households will be more responsive to changes in price than higher-income households in my study area. My ultimate goal is to visualize the income x cost interaction using actual values of cost and water use (which, in any case, will require some sort of back transformation).
I also have a significant number of zero values and values ranging from zero to one in the dependent variable, so log-transforming it and adding a constant of one -- ln(annualtotalOutdoor+1) -- yields the following distribution:
Array
Meanwhile, log-transforming the average cost variable yields the following distribution:
Array
I have read that using a Poisson regression with robust standard errors is preferable to using a log transformation for a skewed continuous dependent variable (https://www.stata.com/stata-news/new...ormed_outcomes). After using the following command:
mepoisson annualtotalOutdoor c.LOGAVECOSTJULY##i.INC75 , vce(robust) || Neighborhood: ||
I am unsure how to proceed with visualizing the interaction effect getting the expected value of outdoor water use based on average cost when INC75 = 0 and INC75 = 0. Meanwhile, visualizing the interaction in Stata using a linear regression (i.e., xtmixed) and margins/marginsplot is more straightforward, and yields the following graph:
Array
However, I am unsure how to obtain the back-transformed values, given that outdoor water use is log transformed (with a constant of 1 added) in addition to average cost being log transformed.
Any advice on how to obtain a visualization of this interaction from the margins command (or otherwise--Excel?) would be greatly appreciated!
Best wishes,
Matt
Related Posts with Visualizing the effect of an interaction term in a log-log model (or poisson model with transformed independent variable)
A little help with summary statisticsHey everyone, Firstly happy Christmas to those who celebrate it and happy holidays too! Back to th…
New version of cprdhesutil on SSCThanks once again to Kit Baum, a new version of the cprdhesutil package is now downloadable from SSC…
Change ID codes to a corresponding different ID codes in a panel datasetI have a dataset where the industries are identified with the NAIC codes. I want to change the NAIC …
New version of htmlutil on SSCThanks as always to Kit Baum, a new version of the htmlutil package is now available from SSC. In St…
how to multiply 100 times in bootstrappingHello Statalist, I am currently working on 2 stage bootstrapping command. I already compute 100 y h…
Subscribe to:
Post Comments (Atom)
0 Response to Visualizing the effect of an interaction term in a log-log model (or poisson model with transformed independent variable)
Post a Comment