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)
Difference between areg and xtset for firmxyear fixed effectDear all, I would like to find the effect of bank liquidity risk (my independent variable) on loan…
Dashed line graph for parts of the lineHello, I would like to use two line styles for the same graph to denote value above and below a cer…
I'm converting a date but the new date variable is all missing valuesI'm using Stata 14.2. i have a dataset with dates in a string variable e.g. 01-Apr-2018. I have used…
Estimating Modified Jones Model ,No final values generated for Jones modelHi, I am trying to estimate the discretionary accruals through the modified Jones model in Stata. T…
How to tell Stata not to ignore missing values in bysort: egen mean commandDear Stata-Listers, I am posting a question for the first time, so I hope I'm doing it correctly. …
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