Hello Statalist,
In summary my original dataset had individual data on 5,230 professors from a university (95% of their faculty population) and their scientific production from 2000-2019, scrapped from their electronic CVs. I have identified all potential and actual ties among professors within that university based on their journal papers, books and conference papers coauthorship and turned the dataset into a dyadic format. For this regression, my dependent variable is tie formation (binary). I have kept all ties=1 and randomly selected 5% of the total sample of potential non formed ties, ending up with a tie sample of over 6 million (Kleinbaum, Stuart, and Tushman (2013) sampling method). The homophilly tie variables are "same origin" (binary, non-inbred vs inbred scholar), "same gender" (binary), "same field" (binary), "ygroup" (categorical, block of 4 years of scientific collaboration) and "degree" (continuous). My ego (A) and alter (P) variables are "non-native", "female", "age", "yexperience", "abroad" (binary, international experience), "postdoc" (continuous, number of postdoc researcher in the science team), "phD", "master", "undergrad", "n_papers", "nbooks", "n_book_chapters", "n_conf_papers", "i.field" (7 field dummies). Now I want to include clustered errors (random effects) for ego and alter in the model, similar to Cameron, Gelbach & Miller (2006) and Dahlander & McFarland (2013). I tried doing both, but xtmixed only accepted to cluster at the ego level. I have not yet found a way to run two-way cluster-robust standard errors.
This is the model that worked clustering only at the ego level.
xtmixed tie non_native_A non_native_P female_A female_P age_A age_P yexperience_A yexperience_P ///
abroad_A abroad_P postdoc_A postdoc_P phd_A phd_P master_A master_P underg_A underg_P ///
n_papers_A n_papers_P nbooks_A nbooks_P n_book_chapters_A n_book_chapters_P ///
n_conf_papers_A n_conf_papers_P i.field_n_A i.field_n_P degree_A degree_P ///
same_origin same_field same_gender i.ygroup || egoID: , vce(cluster egoID) ///
mle covariance(unstructured) variance
Now I want to run it again with clustered errors (random effects) for ego and alter. What would I have to adapt from the previous model to make it work?
P.S.: It is my first time posting a question in this forum, but this has been extremely useful in the 4 years of my PhD, so thank you all for your guidance throughout my studies.
In summary my original dataset had individual data on 5,230 professors from a university (95% of their faculty population) and their scientific production from 2000-2019, scrapped from their electronic CVs. I have identified all potential and actual ties among professors within that university based on their journal papers, books and conference papers coauthorship and turned the dataset into a dyadic format. For this regression, my dependent variable is tie formation (binary). I have kept all ties=1 and randomly selected 5% of the total sample of potential non formed ties, ending up with a tie sample of over 6 million (Kleinbaum, Stuart, and Tushman (2013) sampling method). The homophilly tie variables are "same origin" (binary, non-inbred vs inbred scholar), "same gender" (binary), "same field" (binary), "ygroup" (categorical, block of 4 years of scientific collaboration) and "degree" (continuous). My ego (A) and alter (P) variables are "non-native", "female", "age", "yexperience", "abroad" (binary, international experience), "postdoc" (continuous, number of postdoc researcher in the science team), "phD", "master", "undergrad", "n_papers", "nbooks", "n_book_chapters", "n_conf_papers", "i.field" (7 field dummies). Now I want to include clustered errors (random effects) for ego and alter in the model, similar to Cameron, Gelbach & Miller (2006) and Dahlander & McFarland (2013). I tried doing both, but xtmixed only accepted to cluster at the ego level. I have not yet found a way to run two-way cluster-robust standard errors.
This is the model that worked clustering only at the ego level.
xtmixed tie non_native_A non_native_P female_A female_P age_A age_P yexperience_A yexperience_P ///
abroad_A abroad_P postdoc_A postdoc_P phd_A phd_P master_A master_P underg_A underg_P ///
n_papers_A n_papers_P nbooks_A nbooks_P n_book_chapters_A n_book_chapters_P ///
n_conf_papers_A n_conf_papers_P i.field_n_A i.field_n_P degree_A degree_P ///
same_origin same_field same_gender i.ygroup || egoID: , vce(cluster egoID) ///
mle covariance(unstructured) variance
Now I want to run it again with clustered errors (random effects) for ego and alter. What would I have to adapt from the previous model to make it work?
P.S.: It is my first time posting a question in this forum, but this has been extremely useful in the 4 years of my PhD, so thank you all for your guidance throughout my studies.
Comment