Dummy variables with missing values

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Jason, EViews Moderator, EViews Pamela

Posts: 6
Joined: Tue Mar 22, 2011 6:21 am

Dummy variables with missing values

Postby Andreas0407 » Tue Mar 22, 2011 6:46 am


In our panel data we have a dummy variable that has a lot of missing values (approximately 60% of the values missing, the other 40% have the value 0 or 1). It's no problem to import these data (we import them from excel) but once they are imported, EViews seems to indicate that these values are not-numeric (with an 'abc'-logo before the variable).

I tried to import these data from excel and indicating that they were numbers (not characters) but then all values are displayed as NA.
When trying to do a regression with this dummy it says 'insufficient observations'.

We have another dummy variable in the model which has no missing values and with no problems when doing a regression. Is our problem that our dummy has missing values and that it's not allowed? This dummy is a dummy for management capabilities and is the result of firms' sales/#employees being larger (value 1) or smaller (0) than the average. But, for a lot of firms there is no information on the number of employees so it's not possible to give a value.

If this is our problem, is there a way to circumvent it?

Thanks in advance,

Andreas Standaert

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11727
Joined: Tue Sep 16, 2008 5:38 pm

Re: Dummy variables with missing values

Postby EViews Gareth » Tue Mar 22, 2011 7:56 am

There's nothing special about dummy variables as far as EViews is concerned, so the fact that it is a dummy is irrelevant. The most likely cause of this is that the Excel file has lots of missings at the start (i.e. the first X rows), which means that EViews cannot automatically detect the type of data in that column properly. Without seeing the Excel file, it is hard to comment further.

You can convert from the non-numeric series to a numeric series using the @val function:

Code: Select all

series mydummy = @val(dummy)

where dummy is the alpha series (the one with the "abc" logo).
Follow us on Twitter @IHSEViews

Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 5 guests