Hypothesis Testing and Model Selection for Complex Data