Hello all,
I have an unbalanced panel data set on funds and their respective 3 Factor alphas for each year. Moreover, I have their market segments based on their Objective Codes and their Management name. I need to construct the segment rank of a fund by ordering all funds belonging to a specific market segment (crsp_obj_cd) in a given year according to the 3 Factor alpha and rank them with a normalized value from 0 to 1 (best fund). Also, I need to order funds belonging to a specific family (mgmt_id) and assign to them a normalized rank according to the specified Segment rank.
Lastly, I need to perform a piecewise linear regression by estimating the slope coefficients for the bottom quintile, the 3 middle and the top quintile of segment and family ranks. The variables are as follows:
LOW(FamRank)i,t−1=min(FamRanki,t−1, 0.2)
LOW(SegRank)i,t−1=min(SegRanki,t−1, 0.2)
MID(FamRank)i,t−1=min(FamRanki,t−1 − LOW(FamRank)i,t−1, 0.6)
MID(SegRank)i,t−1=min(SegRanki,t−1 − LOW(SegRank)i,t−1, 0.6)
TOP(FamRank)i,t−1=FamRanki,t−1 − (LOW(FamRank)i,t−1 +MID(FamRank)i,t−1)
TOP(SegRank)i,t−1=SegRanki,t−1 − (LOW(SegRank)i,t−1 +MID(SegRank)i,t−1).
Any help is highly appreciated.
A sample of my dataset is given below:
Array
Related Posts with Slope coefficients for different quintiles of ranks
Creating a more efficient loop for generating multiple datasetsHello Statalist, I am in the process of creating 718 different data files based off of one master d…
Simple table export question: loop or by function?Hi everyone I am currently working on a monitoring and evaluation program where I need to create a …
Calculating rate and confidence interval for a series of data.Hello all I am doing some time series stuff (using R to do interrupted time series analysis - long …
Add string to empty cellHi all, I need add string (N/A) to empty cells for a string Variable, I used "subinstr", but lament…
Treatment covariate interactionsHi, I'm running a model in which I have a two-arm treatment and a covariate interaction. The model …
Subscribe to:
Post Comments (Atom)
0 Response to Slope coefficients for different quintiles of ranks
Post a Comment