Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Forecasting
- /
- Regression

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-12-2014 12:23 PM

Hi All,

I have the following variables in my dataset: companyISIN, year, car5, bm, mv, roa, dy. I also need to do the log of mv variable and divide roa by ression100. So the dependent variable will be car5 and independent variables will be bm, log of mv, roa/100, and dy. In the regression, there will be two fixed effects: firm (i.e. companyISIN) and year.

How can I run the fixed effects regression using proc panel. proc glm, or proc mixed?

I run the following codes but it does not work:

proc panel data = x;

model car = mv ta roa ni dy / fixone;

id CompanyISIN year;

run;

I have included the data file so you can have a look.

Thanks.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-13-2014 01:16 PM

what does the log file say?

I see a bunch of issues.

First, your dependent variable is almost always missing. That dep variable name is car5 but you call it car in the syntax. Other than that, it looks ok as long as the data are sorted.

What do the other variables mean? Happy to help if you provide some additional info.

Thanks-Ken

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-13-2014 03:16 PM

Hi,

Thanks for reply. Yes, the dependent variable will me missing many places because the dependent variable is cumulative abnormal return and independent variables are firm level variables such as book-to-market, market value, return on assets, dividend yield. There are observations for each firm each year of the independent variables but dependent variable, car5, does not have the observations for each firm each year.

Yes, the syntax will be car5.

In the log file, it tells that there is one cross cross section or time series.

I need to run the regression with firm (companyISIN) and year fixed effects. So what will be the codes? should I continue to use proc panel? or should I use proc glm or proc mixed?

Let me know if you need further information. Your help is highly appreciated.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-16-2014 02:03 PM

You can use any PROC you wish, this is a conceptual problem and not a tool problem. For simplicity, you might want to use PROC MIXED or GLM though. See this note SAS/ETS(R) 13.1 User's Guide

If you want to use a Fixed Effects (FE) strategy to control for time and firm level heterogeneity, you are going to have some issues with such sparse data.

Here is the strategy I would use,

proc qlim data=tmp1.x ; class year ;model car5 = bm mv roa dy year / noint;nloptions maxiter=0; run;

This is effectively creating a Dummy for each time and for each cross section. Given that you only have one observation in some cross-sections you need to omit an intercept to get anything that makes sense. Personally I think you should probably consider a Random Effects strategy for estimation because of your data problems. (PROC MIXED)

Hope this helps.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-17-2014 09:48 AM

proc qlim is running and showing the results but the logfile also shows the following error message:

WARNING: The Hessian matrix is singular.

ERROR: QUANEW Optimization cannot be completed.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-17-2014 10:07 AM

Hello -

The error message bascially tells you that the nonlinear optimization algorithm failed to execute.

You may want to try a different optimization technique: http://support.sas.com/documentation/cdl/en/etsug/66840/HTML/default/viewer.htm#etsug_nlomet_sect005...

Thanks,

Udo

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-17-2014 10:54 AM

Just remove maxiter=0 from syntax .

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-17-2014 01:12 PM

Hi,

I included maxiter=0 because I wanted the estimates to be OLS and that is what the optimizer uses as initial values.

Ideally I would have sent you to PROC REG but I couldn't find how to easily do class variables. Feel free to use any tool that uses OLS.

Ken

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-17-2014 01:31 PM

Hi Ken,

Based on error message it seems OLS estimates can not be calculated.

Thanks,

Naeem