Hi,
Im trying to set up a long format data structure to use xtgee models. For each time variable (week) there are three tilt levels. The other variables eg sbp are measured at each tilt level for each assessment week.
When I try to xtset with id week this is not allowed because of repeat weeks (one for each tilt level). I wish to assess time trends in measurements within id across weeks and assess changes within individuals based upon tilt.
Clearly I have set up an incorrect structure for xtset or this is not possible?
Here is an excerpt of the data structure
id week tilt sbp
1 20 10 119
1 20 15 114
1 20 0 117
1 30 15 .
1 30 0 121
1 30 10 113
2 20 0 .
2 20 15 93
2 20 10 106
2 30 15 123
2 30 0 123
any advice would be greatly appreciated
yours
Richard Hiscock
Related Posts with xtset with time variable and categorical variable
Drop unmatched data after IPTWHello everyone, I'd like to ask how to drop unmatched observations after kernel and IPTW matching. T…
Error "pweights must be positive"Hi Statalists, I keeps getting an error message, ""pweights must be positive", when using the "mixe…
Panel Data with Count DV - CEM & Diff-in-Diff & NBREGHello! In my dataset, I'm looking to model the effect of a particular treatment on the number of pa…
forvaluesI am trying to respect the rules/norms of this forum, but I didn't feel dataex did much good in this…
Working with dates (year - week)Hello, I have a variable in my dataset that expresses the year and week in the following way: year …
Subscribe to:
Post Comments (Atom)
0 Response to xtset with time variable and categorical variable
Post a Comment