I am trying to compare the medians of two different variables without a grouping variable.
In my dataset, each row (or observation) represents a pair of associated respiratory samples (one collected at some time point before an illness, and one collected during an illness). I am trying to compare the medians of virus concentrations at these two time points (before illness vs during illness) in our whole study population. Would use ranksum except I do not have a (by) or grouping variable, as the groups I am trying to compare are represented by two variables.
When I attempt to compare the means, the syntax I used successfully was: "ttest mpv_ct == MPVCT" however this does not work to compare medians if i substitute ranksum or median for ttest.
Appreciate any advice. thanks.
In my dataset, each row (or observation) represents a pair of associated respiratory samples (one collected at some time point before an illness, and one collected during an illness). I am trying to compare the medians of virus concentrations at these two time points (before illness vs during illness) in our whole study population. Would use ranksum except I do not have a (by) or grouping variable, as the groups I am trying to compare are represented by two variables.
When I attempt to compare the means, the syntax I used successfully was: "ttest mpv_ct == MPVCT" however this does not work to compare medians if i substitute ranksum or median for ttest.
Appreciate any advice. thanks.
Comment