Dependent variable has no variance - Logit regression
Posted: Sat Apr 30, 2022 3:30 pm
Hello,
I am running a logit regression with over 90000 observations. The dependent variable is a binary variable that takes the value 1 or 0. The sample has only 115 positive cases (dependent variable = 1). When I estimated the equation, it gave me a "Dependent variable has no variance". Some resources suggest expanding the data sample. However, the dataset only has 135 positive cases of default cases per 500,000 observations. This leads me to believe that there aren't any significant benefits in expanding the data sample. I also checked if the data had any variable listed as "NA" based on other thread on this website. It had one observation as NA, and I edited. However, the issue still persists. In addition, I have read the online guide, and it states that "First, you may get the error message “Dependent variable has no variance.” This error means that there is no variation in the dependent variable (the variable is always one or zero for all valid observations). This error most often occurs when EViews excludes the entire sample of observations for which takes values other than zero or one, leaving too few observations for estimation.
You should make certain to recode your data so that the binary indicators take the values zero and one. This requirement is not as restrictive at it may first seem, since the recoding may easily be done using auto-series. Suppose, for example, that you have data where takes the values 1000 and 2000. You could then use the boolean auto-series, “y=1000”, or perhaps, “y<1500”, as your dependent variable.
I m not sure I understand how this is to be done in my case. Since in my case, the values are 1 and 0 and they are very unbalanced as there are only 115 values of one and the rest of the observations out of 90000 are zero. What should the command be? Is this the following command correct? If not, please provide step by step instructions.
boolean autoseries, y=1
Thankyou
I am running a logit regression with over 90000 observations. The dependent variable is a binary variable that takes the value 1 or 0. The sample has only 115 positive cases (dependent variable = 1). When I estimated the equation, it gave me a "Dependent variable has no variance". Some resources suggest expanding the data sample. However, the dataset only has 135 positive cases of default cases per 500,000 observations. This leads me to believe that there aren't any significant benefits in expanding the data sample. I also checked if the data had any variable listed as "NA" based on other thread on this website. It had one observation as NA, and I edited. However, the issue still persists. In addition, I have read the online guide, and it states that "First, you may get the error message “Dependent variable has no variance.” This error means that there is no variation in the dependent variable (the variable is always one or zero for all valid observations). This error most often occurs when EViews excludes the entire sample of observations for which takes values other than zero or one, leaving too few observations for estimation.
You should make certain to recode your data so that the binary indicators take the values zero and one. This requirement is not as restrictive at it may first seem, since the recoding may easily be done using auto-series. Suppose, for example, that you have data where takes the values 1000 and 2000. You could then use the boolean auto-series, “y=1000”, or perhaps, “y<1500”, as your dependent variable.
I m not sure I understand how this is to be done in my case. Since in my case, the values are 1 and 0 and they are very unbalanced as there are only 115 values of one and the rest of the observations out of 90000 are zero. What should the command be? Is this the following command correct? If not, please provide step by step instructions.
boolean autoseries, y=1
Thankyou