Stata import data problem

Paste directly from excel 

The format is as follows

Then type in commond

reshape long y x1 x2 x3 x4 x5, i(id), j(year) to change the data to panel data

If there is red because it is of str type and not float type, then enter the command

 destring y10, replace

If the error shows that there is nonnumer or something, it is because there are spaces, commas or horizontal lines in the data 

Find it and delete this line 

After changing

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325050978&siteId=291194637