problem with missing values in non normally distributed vars

200 views
Skip to first unread message

e joffe

unread,
Jul 19, 2015, 3:52:17 PM7/19/15
to comparegr...@googlegroups.com
Hi,

I am using compareGroups to analyze a dataset
I have several numeric variables which have missing values.
When I run CG I get an error for all the values which have NAs but only for non-normally distributed 
when I use na.action=na.exclude it removes all the records because each record has a missing value somewhere.

any idea how to solve this ?
CG=compareGroups(conditioning_prot~age_trans+sex+type+subtype+stage_diag+b_symp+cns+hctci+protocol_1+
                   rad+numCyc_1+outcome_1+relapse_1+protocol_2+numCyc_2+outcome_2+
                   status_trans+time_from_dx+time_from_rel+mobilization_type+               dose_modification+modification_percent+nucleated_cells+cd34_kg+cd34_lt2+anc_engraftment+plt_engraft_25+
                   plt_engraft_50+relapse_post_trans+status+cause_death+mucositis+bacteremia_fungemia+mech_vent+
                   blood_trans+plt_trans+hospital_los,method=method,Q1=0, Q3=1,data=tecam)




Thanks,
Erel

Isaac Subirana

unread,
Jul 20, 2015, 5:48:02 AM7/20/15
to comparegr...@googlegroups.com
Could you provide an example data set in order to investigate what is happening?
Thanks.

e joffe

unread,
Aug 28, 2015, 9:46:44 AM8/28/15
to compareGroups Forum
Hi,

So I have a problem with getting descriptive stats for non-normally distributed values.
Attached is the file with the data.

The code I am using is 

library(compareGroups)
compareGroups(AF~age,method=2,data=temp,Q1=0,Q3=1)

The error I get is
Error in compareGroups.default(X = X, y = y, include.label = include.label,  : 
  None variable can be computed

Thanks 
Erel
temp.RData

compareGroups

unread,
Sep 1, 2015, 5:41:44 AM9/1/15
to compareGroups Forum
Hi Erel,

I've just reproduced your example and obtained no error but only a warning. Bellow, there are the results from my PC (Windows) with the latest R version (3.2.2) and latest compareGroups version (3.0.1)
Please, could you indicate me the R and compareGroups package versions you are using?

Best,

Isaac.

> library(compareGroups)
> compareGroups(AF~age,method=2,data=temp,Q1=0,Q3=1)


-------- Summary of results by groups of 'AF'---------


  var N   p.value method                selection
1 age 701 0.004** continuous non-normal ALL      
-----
Signif. codes:  0 '**' 0.05 '*' 0.1 ' ' 1 

Warning message:
In cor.test.default(x, as.integer(y), method = "spearman") :
  Cannot compute exact p-value with ties



Reply all
Reply to author
Forward
0 new messages