Hello!
I am trying to use the ptrend command to look at my binary y variable and categorical x variable (years 2013-2018).
My data set is burn admissions divided by the total number of hospital admissions for the year. I am looking at the trend of admissions over the 6 years.
The data that I want to use are the float variables, which have been created by division of the long and integer variables. When I run the ptrend command with the float data, the error r(2000) "no observations" appears.
I am able to use the ptrend command with integer and long data, but the integer is a raw count of admissions and I want to look at burn admissions as a percentage of total admissions.
My question: Does anyone have a recommendation for how I can use the ptrend command with this data?
I have attached my code below.
Thank you so much.
Best,
Cami Rencken
. describe
Contains data
obs: 6
vars: 17
size: 336
-------------------------------------------------------------------------------------------------------------------------------------------------------
storage display value
variable name type format label variable label
-------------------------------------------------------------------------------------------------------------------------------------------------------
year int %8.0g Year
admissionstotal long %8.0g Admissions - Total
severe int %8.0g
sad float %8.0g
scontrol float %8.0g
moderate int %8.0g
moad float %8.0g
mocontrol float %8.0g
mild int %8.0g
miad float %8.0g
micontrol float %8.0g
child int %8.0g
cad float %8.0g
ccontrol float %8.0g
adult int %8.0g
aad float %8.0g
acontrol float %8.0g
-------------------------------------------------------------------------------------------------------------------------------------------------------
Sorted by:
Note: Dataset has changed since last saved.
. ptrend sad scontrol year
no observations
r(2000);
. tab sad
sad | Freq. Percent Cum.
------------+-----------------------------------
.0005697 | 1 16.67 16.67
.0006279 | 1 16.67 33.33
.000639 | 1 16.67 50.00
.000644 | 1 16.67 66.67
.0006458 | 1 16.67 83.33
.0006893 | 1 16.67 100.00
------------+-----------------------------------
Total | 6 100.00
. tab scontrol
scontrol | Freq. Percent Cum.
------------+-----------------------------------
.000639 | 6 100.00 100.00
------------+-----------------------------------
Total | 6 100.00
Related Posts with Problem using ptrend command
Fractional logit model and panel dataHi all, I am using a "fractional logit" model (as suggested by another paper) on my panel data (DV:…
xtivreg, re firstHello. I have a question about the first stage regression in xtivreg, re. I assume it should possib…
Very large variance in PROBIT regressionhi, I had a problem with the variance when I run IVPROBIT regression. I have a number of binary vari…
DestringI have data with observations that are numeric but appear red and so cannot manipulate some formulas…
Distribution of individual fixed effectsHi there, I am running a panel regression model using the 'reghdfe'-command with high-dimensional f…
Subscribe to:
Post Comments (Atom)
0 Response to Problem using ptrend command
Post a Comment