Long format for OLS?

Hello everyone,

I am currently working on a project for which I use a panel analysis and ordinary least squares analysis. For the panel analysis I transformed the data set into a long format. afterwards I tested a hypothesis using OLS and kept the long format. Now I am thinking, is this correct?Or do I have to transform it back into the wide format for OLS?
I hope it is not a stupid question :p, however I could not find anything on this on the web.Please respond :confused:


Ambassador to the humans
The format of the data has nothing to do with the method of analysis. Certain programs might require data to be in a certain format for a certain type of analysis but you haven't given us that information.
thanks you for quick reply!

I am using Stata. Basically, what I was afraid of was that it may give me wrong results if i keep it in a long format using OLS in stata.


Ambassador to the humans
Hmm. I don't use stata - I'm going to move this over to the stata forum since it's more of a stata question at this point.


Do you mean that you ran a simple linear regression using OLS? I agree with Dason that the data structure isn't important here. Did you use some kind of clustered variance estimator to account for the within-cluster correlation?
I ran a multiple linear regression using OLS.

No, I have not used a clustered variance estimator. I have never heard of it, I am still a college student:). I will look it up and see if it is appropriate in my case!
Thank you!