Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 65037

xtile, both nquantiles() and cutpoints() cannot be specified

$
0
0
Hey community,

when I try to compute deciles of a variable based on the cutpoints of another variable, I just get the following message:

xtile decile = cumul, nq(10) c(pt3531)
both nquantiles() and cutpoints() cannot be specified


Here is a part of my dataset:

Code:
month_id cumul pt3531 pt3541 pt3551 pt3561 pt3571 pt3581)
10804 354  .27272728 . . . . . .
10804 354  .16199674 . . . . . .
10804 354   .7142857 . . . . . .
10804 354 -.14285715 . . . . . .
10804 354   .3436254 . . . . . .
10804 354   .2247271 . . . . . .
10804 354  -.4146341 . . . . . .
10804 354  .14470015 . . . . . .
10804 354  .24468087 . . . . . .
10804 354          . . . . . . .
10804 354 -.24624866 . . . . . .
10804 354   .3379539 . . . . . .
10804 354  -.1860465 . . . . . .
10804 354  -.3076923 . . . . . .
10804 354   .3636363 . . . . . .
10804 354   .7421384 . . . . . .
10804 354          . . . . . . .
10804 354  .09677418 . . . . . .
10804 354  -.4090909 . . . . . .
10804 354          . . . . . . .
10804 354  .05516519 . . . . . .
10804 354    -.21564 . . . . . .
10804 354          . . . . . . .
10804 354  -.2227859 . . . . . .
10804 354 -.10743044 . . . . . .
10804 354   -.359375 . . . . . .
10804 354 -.08108108 . . . . . .
10804 354          . . . . . . .
10804 354     -.0875 . . . . . .
10804 354  -.4807692 . . . . . .
10804 354  -.4358974 . . . . . .
end
format %d date
I created pt3531/pt3581 by using a loop:

use final.dta, clear
forval i=353/358 {
preserve
keep if month_id==`i'
pctile pt = cumul if exchcd==1, nq(10)
mkmat pt, mat(pt`i')
restore
}
forval i=353/671 {
svmat pt`i'
}


I hope you can help me out and tell me why my nquantiles and cutpoints cannot be specified.

Best,
Bat

Viewing all articles
Browse latest Browse all 65037

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>