s-news
[Top] [All Lists]

Re: [S] transcan()-error message

To: Matthias Richard <richard@psyres-stuttgart.de>
Subject: Re: [S] transcan()-error message
From: Frank E Harrell Jr <fharrell@virginia.edu>
Date: Tue, 30 May 2000 03:31:04 -0400
Cc: SPLUS-Diskussionsliste <s-news@wubios.wustl.edu>
Organization: University of Virginia
References: <Pine.GSO.4.21.0005301315001.678-100000@sunserv.psyres-stuttgart.de>
Sender: owner-s-news@wubios.wustl.edu
This is a singularity problem.  Either a category of one of
the categorical variables is redundant with respect to all
the other variables and their categories, or you have too
many knots in a continuous variable.

Also, the preferred usage of transcan is the formula-type
call, e.g. w <- transcan(~x1 + x2 + ....).  Using that
form transcan can sense what type of variables you have
To force linearity use e.g. I(x1).  -Frank Harrell

Matthias Richard wrote:

> Hello everybody!
>
> I use transcan() to impute missing values in my set
> of predictors, but I keep getting an error message:
>
> --------------------------------------------
> Convergence criterion: Error in
>    "%*%.default" (cbind(1,R[[i]..:
>    Number of columns of x should be the same
>    as number of rows of y
> Dumped
> --------------------------------------------
>
> transcan is called by:
> xan<- transcan(as.matrix(imp.anpred), method="canonical",
>            asis=c("VOMIT",... , "DISRUPT"),
>     categorical=c("TYPE.AN", "AMENO"),
> imputed=T, impcat="score",n.impute=5, data=imp.anpred)
>
> 'imp.anpred' is the data frame with the covariates only, none of the
> variables are defined as factors.
>
> I have a set of 30 predictors. Everything works fine until
> I enter a (binary) variable in categorical=c() I get
> the error message above.  I tried to put a variable with
> three categories into categorical=(), which I had before in
> asis=() - and this did not work too.
>
> Is there anything I am doing wrong here? Or is it possible
> that the data may contain too many NAs (some variables have
> 20%)?
> Any ideas, what is going on here?
>
> (Pentium I PC, 133Mhz, WIN95, 64MB memory)
>
> 1.000.000 thanks in advance!!!
>
> Matthias
>
> ----------------------------------------
> Matthias Richard (doctoral candidate)
>
> Center for Research on Psychotherapy
> Christian-Belser-Str. 79a
> 70593 Suttgart
> Germany
> email: richard@psyres-stuttgart.de
> telephone: ++49-711-6781-408
> http://www.psyres-stuttgart.de
>
> COST Action B6:
> 'Efficient Psychotherapy of Eating Disorders'
> (COoperation of Science and Technology in the European Union)
> -----------------------------------------
>
> -----------------------------------------------------------------------
> This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
> send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
> message:  unsubscribe s-news

--
Frank E Harrell Jr
Professor of Biostatistics and Statistics
Division of Biostatistics and Epidemiology
Department of Health Evaluation Sciences
University of Virginia School of Medicine
http://hesweb1.med.virginia.edu/biostat


-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>