Hi Statalist, I am new here but this forum is been helpful several times.
I am using stata15, and there's my problem:
I have a large amount of datasets, and I am looping them in order to produce kdensities and compare them. Each dataset has a different sample size.
I am entering the following command inside my loop:
kdensity variable, generate(x y) n() nograph
I am trying to find a way to put automatically the sample size inside the option n().
If I write:
count
kdensity variable, generate(x y) n(r(N)) nograph
stata says: option n() not allowed r(198);
It happens the same if I try to use a local with r(N)
How can I do? I would avoid to make them one-by-one
Related Posts with set n(#) in a kdensity loop with different sample sizes
High R-square in ppmlHi statalist, I would like to clarify few things about using ppml on gravity data. 1. I'm trying t…
Converting raster format data (5 arc-minute grid cells) to country-level panel data that can be read in STATAHi all! I am working on a project where I am looking at the impact of climate/weather variables (te…
How to show the unique value of a characteristic variable in panel data?I am having a panel data with the unit is firms in 65 countries around the world with the time serie…
Conditional probabilities in StataHi, I have a data as following: hhid year cropcode 1 2019 676 1 2019 837 1 2019 829 1 202…
Fixed effectDear all, I will please like to find out the explanation for the issue below. I have a cross secti…
Subscribe to:
Post Comments (Atom)
0 Response to set n(#) in a kdensity loop with different sample sizes
Post a Comment