Good afternoon,
I would like to ask if this is possible in Stata.
I have the following data (input from excel file):
I would like this grouping as the final result (based on the ID and parent teaching):
(in the example there are also cases of teaching fathers without children, and teaching children without fathers).
If it is possible (but it is not an essential request), color the line where the "father" teaching appears, red.
Again, I don't know if this is possible in Stata. For me it would be a great help (here I have only given a few examples, but in reality there are many more).
Thank you for your help!
Best regards
Riccardo
I would like to ask if this is possible in Stata.
I have the following data (input from excel file):
ID | CDS_COD | PDS_DES | MODULE_CODE | DES_TIPO_CICLO | LOANED | LOAN_FROM_MODULE_CODE | LOAN_GRADE | FATHER CODE ID |
460041 | LT10 | PERCORSO COMUNE | LT1220 | I Semestre | FATHER | 460041 | ||
459951 | LM3 | MASTER EUROPEÉN EN ETUDES FRANÇAISES ET FRANCOPHONES | LMF05L | II Semestre | SI | LMF05L | SON | 459795 |
459948 | LM3 | MASTER EUROPEÉN EN ETUDES FRANÇAISES ET FRANCOPHONES | LMF03L | II Semestre | SI | LMF03L | SON | 459869 |
459925 | LM3 | ESTUDIOS IBÉRICOS E IBEROAMERICANOS | LMI02Q-1 | I Semestre | SI | LMI02Q-1 | SON | 459847 |
459869 | LM3 | LETTERATURE E CULTURE | LMF03L | II Semestre | FATHER | 459869 | ||
459847 | LM3 | LETTERATURE E CULTURE | LMI02Q-1 | I Semestre | FATHER | 459847 | ||
459795 | LM3 | LETTERATURE E CULTURE | LMF05L | II Semestre | FATHER | 459795 | ||
459714 | LM5 | SCIENZE DEL LINGUAGGIO | LM005L | II Semestre | SI | LM005L | SON | 459795 |
459704 | LM5 | SCIENZE DEL LINGUAGGIO | LM001Q | I Semestre | SI | LM001Q | SON | 459847 |
459619 | LM60 | PERCORSO COMUNE | LM1970 | I Semestre | SI | LM1970 | SON | 459847 |
412248 | LM3 | LETTERATURE E CULTURE | FM0068 | II Semestre | FM0068 | SON | 444298 | |
407036 | LM3 | ESTUDIOS IBÉRICOS E IBEROAMERICANOS | LMI980 | I Semestre | SI | LMI980 | SON | 459847 |
407035 | LM3 | LETTERATURE E CULTURE | LMI980 | I Semestre | SI | LMI980 | SON | 459847 |
459982 | LM3 | LETTERATURE E CULTURE | LMF04L | II Semestre | SI | LMF04L | SON | 459869 |
459972 | LM3 | MASTER EUROPEÉN EN ETUDES FRANÇAISES ET FRANCOPHONES | LMF04L | II Semestre | SI | LMF04L | SON | 459869 |
I would like this grouping as the final result (based on the ID and parent teaching):
ID | CDS_COD | PDS_DES | MODULE_CODE | DES_TIPO_CICLO | LOANED | LOAN_FROM_MODULE_CODE | LOAN_GRADE | FATHER CODE ID |
459847 | LM3 | LETTERATURE E CULTURE | LMI02Q-1 | I Semestre | FATHER | 459847 | ||
459925 | LM3 | ESTUDIOS IBÉRICOS E IBEROAMERICANOS | LMI02Q-1 | I Semestre | SI | LMI02Q-1 | SON | 459847 |
407035 | LM3 | LETTERATURE E CULTURE | LMI980 | I Semestre | SI | LMI980 | SON | 459847 |
407036 | LM3 | ESTUDIOS IBÉRICOS E IBEROAMERICANOS | LMI980 | I Semestre | SI | LMI980 | SON | 459847 |
459619 | LM60 | PERCORSO COMUNE | LM1970 | I Semestre | SI | LM1970 | SON | 459847 |
459704 | LM5 | SCIENZE DEL LINGUAGGIO | LM001Q | I Semestre | SI | LM001Q | SON | 459847 |
459795 | LM3 | LETTERATURE E CULTURE | LMF05L | II Semestre | FATHER | 459795 | ||
459714 | LM5 | SCIENZE DEL LINGUAGGIO | LM005L | II Semestre | SI | LM005L | SON | 459795 |
459951 | LM3 | MASTER EUROPEÉN EN ETUDES FRANÇAISES ET FRANCOPHONES | LMF05L | II Semestre | SI | LMF05L | SON | 459795 |
460041 | LT10 | PERCORSO COMUNE | LT1220 | I Semestre | FATHER | 460041 | ||
459869 | LM3 | LETTERATURE E CULTURE | LMF03L | II Semestre | FATHER | 459869 | ||
459972 | LM3 | MASTER EUROPEÉN EN ETUDES FRANÇAISES ET FRANCOPHONES | LMF04L | II Semestre | SI | LMF04L | SON | 459869 |
459982 | LM3 | LETTERATURE E CULTURE | LMF04L | II Semestre | SI | LMF04L | SON | 459869 |
459948 | LM3 | MASTER EUROPEÉN EN ETUDES FRANÇAISES ET FRANCOPHONES | LMF03L | II Semestre | SI | LMF03L | SON | 459869 |
412248 | LM3 | LETTERATURE E CULTURE | FM0068 | II Semestre | SON | 444298 |
If it is possible (but it is not an essential request), color the line where the "father" teaching appears, red.
Again, I don't know if this is possible in Stata. For me it would be a great help (here I have only given a few examples, but in reality there are many more).
Thank you for your help!
Best regards
Riccardo
Comment