Hi all,
I am wondering if anyone has any ideas on how I can compare each observation from one variable to every observation in another variable. Essentially, imagine you have 10 observations in one variable A, and then another 1000 in another variable B. For each observation in variable A, I would like to compare it to every value in variable B. In reality, I have over 300,000 observations for each variable, so the computation becomes cumbersome quickly.
I have currently figured out the problem in Python, but it takes over 2 minutes to run through 300 observations (or roughly 10ish hours for the whole dataset). The algorithm is straightforward enough in Python - fix variable 1, compare to every observation in variable 2; fix variable 2, compare to every observation in variable 2, etc., etc... Is there anything in Stata a bit more sophisticated?
I am currently using StataIC 15 on MacOS.
Related Posts with Comparing each observation from one variable to few hundred thousand in another
xtpoisson with exposure(varname): how to select the appropriate varname?I'm working on a paper with count data and am using a panel Poisson regression model (xtpoisson). I…
Drop or Keep Observations by titleDear Researchers, hope everyone blessed with healthy life. I've a column (in Excel) with different …
Merging databasesHi there, I really appreciate any help you can offer me. Basically I have a relational database iss…
Fixed effects code in a regressionDear Everyone, I would like to know if my code is correct. I am doing a regression (DiD) where I ha…
Missing categories in newly created categorical variableHi Statalist. I have found that after creating a new categorical variable that not all categories a…
Subscribe to:
Post Comments (Atom)
0 Response to Comparing each observation from one variable to few hundred thousand in another
Post a Comment