[R] Problems using hetcor (polycor)
Mark Difford
mark_difford at yahoo.co.uk
Thu Aug 7 15:51:41 CEST 2008
Hi Birgitle,
>> It seems than, that it is not possible to use all variables without
>> somehow
>> imputing missing values.
It depends on what you are after. You can use the full data set if you set
std.err=F and pd=F. Then exclude the columns that cause it to falter and
redo with SEs turned on. You have the correlations; all you lack are SEs for
ca. 5 columns.
And I haven't tried your revised classification; that's for you to do.
Regards, Mark.
Birgitle wrote:
>
> Many Thanks Mark for your answer.
>
> It seems than, that it is not possible to use all variables without
> somehow imputing missing values.
>
> But I will try which variables I can finally use.
>
> Many thanks again.
>
> B.
>
>
> Mark Difford wrote:
>>
>> Hi Birgitle,
>>
>> It seems to be failing on those columns that have just a single "entry"
>> (i.e = 1, with the rest as 0; having just 1, an <NA>, and then 0s gets
>> you through). And there are other reasons for failure (in the call to get
>> a positive definite matrix).
>>
>> The main problem lies in the calculation of standard errors for some
>> combinations. You can get a result for all columns by turning this off.
>> You can get standard errors for all the columns up to 60 by omitting
>> columns 12, 23, and 44. You need to work out the rest yourself by
>> "columning" forwards till you get a failure, then drop that column from
>> the index. There probably isn't enough information to calculate SEs for
>> the columns that cause an error.
>>
>> ## This works with default settings but without columns 12, 23 and 44
>> hetcor(TestPart[,c(1:11,13:22,24:43,45)], pd=T, std.err=T,
>> use="complete.obs")
>>
>> ## The first fails; the second works
>> hetcor(TestPart[,c(1:11,13:22,24:43,45:60)], pd=T, std.err=F)
>> hetcor(TestPart[,c(1:72)], pd=F, std.err=F)
>>
>> HTH, Mark.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Problems-using-hetcor-%28polycor%29-tp18867343p18870999.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list