Hello.
I have a question regarding a variable I have constructed. For a number of countries, I have multiple observations for each country.
The thing is that I have a dichotomous variable (it can only take value 0 or 1) for each such observation. From this, for each country, I have created a variable that shows the percentage of observations (within the country), in which the dichotomous variable takes value 1.
Example: I have a country A with 24 observations for that country. Of those 24 observations, in the dichotomous variable X, 13 observations take value 1 and the rest 0. Therefore, my constructed variable, Y, for country A would take value 51.166%.
My question is, is that variable Y discrete or continuous? Could I estimate by OLS if the dependent variable is Y?
Thanks for your attention!
Related Posts with Continuous or discrete variable?
Putexcel Loop over several cross tabulationsHello, I'd like to run some weighted cross-tabulations, and use putexcel to save the output in excel…
Interpreting coefficients of a continuous variable interacted with a categorial variable in regressionIn a xtlogit model Code: xtlogit mental_health i.gender i.age income#i.province Can I use Code: ma…
Help needed for Matplotlib in StataHi, I am using Stata 17 and was using some python codes to plot some bar charts. Below is my code: …
How to convert string id variable starting with "00" to numeric without losing the "00"?Hi, could any one help me with the following two issues? First, my id variable values start with 00…
Scatterplot with weighted regression line using aaplot and lfitDear Statalist, I'm trying to graph a scatterplot with a regressionline. Instead of a standard OLS …
Subscribe to:
Post Comments (Atom)
0 Response to Continuous or discrete variable?
Post a Comment