Hi Statalisters

If I set a dataset to a panel dataset using xtset, what exactly is STATA doing? For example, I always thought that if I say:

logit y x1 x2 i.period i.person

then it should be the same as

xtset period person
xtlogit y x1 x2

Meaning, I thought setting up a panel with xtset is the same as controlling for each peron and each period in your dataset.
But I just ran both versions on the same dataset and I get different results, now I am not sure what xtset actually does.

Any advice would be greatly appreciated.

Thanks