Code something up and try it for yourself. If you get an error message then post the code here for some help.
woooee
Nearly a Posting Maven
2,454 posts since Dec 2006
Reputation Points: 777
Solved Threads: 714
This code runs fine:
def ols(x, y):
class output:
pass
results = output()
results.method = 'ols'
results.y = y
#results.nobs = n
#results.nvar = nvar
#results.beta = B
return results
r = ols(1,2)
print r
I think the problem with yours might have been that you were accessing non-existent variables n, nvar, and B.
Jeff
jrcagle
Practically a Master Poster
608 posts since Jul 2006
Reputation Points: 92
Solved Threads: 156