please consider the following data set:
input str3 ID byte str9 shock byte str1 evnt
ID shock evnt
1. 111 category1 y
2. 111 category2 y
3. 111 category3 n
4. 112 category1 y
5. 112 category2 n
6. 112 category3 n
7. end
. list
+------------------------+
| ID shock evnt |
|------------------------|
1. | 111 category1 y |
2. | 111 category2 y |
3. | 111 category3 n |
4. | 112 category1 y |
5. | 112 category2 n |
|------------------------|
6. | 112 category3 n |
+------------------------+
ID shock evnt
1. 111 category1 y
2. 111 category2 y
3. 111 category3 n
4. 112 category1 y
5. 112 category2 n
6. 112 category3 n
7. end
. list
+------------------------+
| ID shock evnt |
|------------------------|
1. | 111 category1 y |
2. | 111 category2 y |
3. | 111 category3 n |
4. | 112 category1 y |
5. | 112 category2 n |
|------------------------|
6. | 112 category3 n |
+------------------------+
input str3 ID byte str1 shock1
ID shock1
1. 111 y
2. 112 y
3. end
. list
+--------------+
| ID shock1 |
|--------------|
1. | 111 y |
2. | 112 y |
+--------------+
ID shock1
1. 111 y
2. 112 y
3. end
. list
+--------------+
| ID shock1 |
|--------------|
1. | 111 y |
2. | 112 y |
+--------------+
Thank you.
Also, apologies for the tables not coming out as desired. I have installed dataex before generating the data set, but somehow the tables aren't coming out as they should.
0 Response to Help with writing code for data with value labels
Post a Comment