Data management: How to reshape data from long format to wide format

preview_player
Показать описание
This video demonstrates how to reshape data from long format to wide format in Stata using the *reshape* command.

Copyright 2011-2019 StataCorp LLC. All rights reserved.
Рекомендации по теме
Комментарии
Автор

Thank you so much for this video. It gave a foothold in stata

safari-thestatisticstutor
Автор

Hi, This was helpful and I tried it myself. However it's not accepting it so do you know how to do this for multiple variables/measurements under multiple echocardiogram scans that have been performed for a set number patients?

elliewizard
Автор

how do you fix this:

values of variable year not unique within sid stateid
Your data are currently long. You are performing a reshape wide. You specified i(sid stateid) and j(year). There are
observations within i(sid stateid) with the same value of j(year). In the long data, variables i() and j() together must
uniquely identify the observations.

criticalthought
Автор

how about if there is no variable of year?

maggiefg