Calculate Within Shares for Nesting Structure
gen_within_share(df, mkt_share, nest_share, subnest_share = NULL)
df | Dataframe to work with |
---|---|
mkt_share | Variable containing product market shares, as a character string. |
nest_share | Variable containing market share of nest, as a character string. |
subnest_share | Variable containing market share of subnest, as a character string. |
A dataframe with the outside- and nest-shares added.