Hello all,
I need your help regarding rangestat command. I have a panel dataset with the panel dimensions as stores and weeks. I have the sales price of 11 products in each combination of stores and weeks.
I want to create an average price for each product across the other stores but within the same week. For instance, for product 1, I want the average price of product 1 sold at all the stores in a given week, etc.
I am using the command
rangestat (mean) average_price = price, interval(store 1 137) excludeself by (product week)
I am not sure if I am using the command correctly. I tried to compute the values of a couple of observations manually to validate te results and I think they are not the same. For instance, I filtered my data to only include product 1 and week 1. I then calculated the average price of product 1 sold in week 1 at all the stores. I got a different result.
Would you please help? Am I defining the command correctly? the interval should include the stores, am I right?
Related Posts with rangestat command
table that shows average number of appliances owned by household typeDear all, I am stuck with the following challenge: I have household data with the information: hous…
Delete non-matching portions of string variableHi. I have a local (defined below). I also have a string variable Event. I want to only retain words…
Why do results of teffects versus psmatch2 differ so much?I use teffects and psmatch2 to check if they produce same results. They do not. Below is the code. W…
Panel data xtreg i.years - multiple years omittedHello, I am doing a research about the effect of gender diversity on firm performance with panel da…
Generating values of a variable based on the values of other variables.Hi, In my data, I have portfolio id, port_ret, first, date, count, have, and want. Id is simply th…
Subscribe to:
Post Comments (Atom)
0 Response to rangestat command
Post a Comment