Problems to obtain standardized betas in multiply-imputed data

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems to obtain standardized betas in multiply-imputed data

R help mailing list-2
Dear all,

I am having problems in obtaining standardized betas on a multiply-imputed data set. Here are the codes I used :
imp = mice(data, 5, maxit=10, seed=42, print=FALSE)
FitImp <- with(imp,lm(y ~ x1 + x2 + x3))
Up to here everything is fine. But when I ask for the standardized coefficients of the multiply-imputed regressions using this command :
sdBeta <- lm.beta(FitImp)
I get the following error message:
Error in b * sx : argument non numérique pour un opérateur binaire

Can anyone help me with this please?

Anne

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Summarizing R script

Spencer Brackett
R users,

  Is anyone aware of the proper procedure for summarizing a script(your
complete list of functions, arguments , and error codes within your R
console for say a formal report or publication?

Many thanks,

Best wishes,

Spencer Brackett

---------- Forwarded message ---------
From: CHATTON Anne via R-help <[hidden email]>
Date: Wed, Sep 26, 2018 at 6:03 AM
Subject: [R] Problems to obtain standardized betas in multiply-imputed data
To: [hidden email] <[hidden email]>


Dear all,

I am having problems in obtaining standardized betas on a multiply-imputed
data set. Here are the codes I used :
imp = mice(data, 5, maxit=10, seed=42, print=FALSE)
FitImp <- with(imp,lm(y ~ x1 + x2 + x3))
Up to here everything is fine. But when I ask for the standardized
coefficients of the multiply-imputed regressions using this command :
sdBeta <- lm.beta(FitImp)
I get the following error message:
Error in b * sx : argument non numérique pour un opérateur binaire

Can anyone help me with this please?

Anne

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Summarizing R script

Roger Koenker-3
In reply to this post by R help mailing list-2
I use R CMD BATCH foo which produces a file called foo.Rout and provided the script includes
sessionInfo() constitutes a quite sufficient summary for my purposes, it isn’t exactly pretty, but it
is informative.

> On Sep 26, 2018, at 3:00 PM, Spencer Brackett <[hidden email]> wrote:
>
> R users,
>
>  Is anyone aware of the proper procedure for summarizing a script(your
> complete list of functions, arguments , and error codes within your R
> console for say a formal report or publication?
>
> Many thanks,
>
> Best wishes,
>
> Spencer Brackett
>
> ---------- Forwarded message ---------
> From: CHATTON Anne via R-help <[hidden email]>
> Date: Wed, Sep 26, 2018 at 6:03 AM
> Subject: [R] Problems to obtain standardized betas in multiply-imputed data
> To: [hidden email] <[hidden email]>
>
>
> Dear all,
>
> I am having problems in obtaining standardized betas on a multiply-imputed
> data set. Here are the codes I used :
> imp = mice(data, 5, maxit=10, seed=42, print=FALSE)
> FitImp <- with(imp,lm(y ~ x1 + x2 + x3))
> Up to here everything is fine. But when I ask for the standardized
> coefficients of the multiply-imputed regressions using this command :
> sdBeta <- lm.beta(FitImp)
> I get the following error message:
> Error in b * sx : argument non numérique pour un opérateur binaire
>
> Can anyone help me with this please?
>
> Anne
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Summarizing R script

Spencer Graves-4


       It depends on what you want, but I've found it very useful to
create packages and submitting them to CRAN.  See "Creating R Packages"
for how to do that.[1]  Part of this involves creating vignettes using
Rmarkdown within RStudio.  Creating R packages and routinely running "R
CMD check" sounds like it would take extra time.  My experience has been
very much the opposite, because it dramatically reduces the bugs in my
software and makes it vastly easier to find the bugs that still exist. 
AND I have something I can just hand to others, and they can use it. 
That would be exceedingly difficult otherwise.


       And there are publications like "R Journal" that are looking for
descriptions of what you've done.  I have a paper in "R Journal"
describing the "sos" package;  that article is a vignette in that
package.  This process has worked for me.[2]


        Spencer


[1] Available from help.start().  See also
"https://cran.r-project.org/doc/manuals/r-release/R-exts.html".


[2] The "sos" package is the fastest literature search I know for
anything statistical.  It's availability on CRAN combined with the R
Journal article got me invited to help organize a plenary session on
"Navigating the R Package Universe" at the useR!2017 conference in
Brussels last year.  This is an example of how creating an R package
with a vignette has helped me find an audience.


On 2018-09-26 09:06, Roger Koenker wrote:

> I use R CMD BATCH foo which produces a file called foo.Rout and provided the script includes
> sessionInfo() constitutes a quite sufficient summary for my purposes, it isn’t exactly pretty, but it
> is informative.
>
>> On Sep 26, 2018, at 3:00 PM, Spencer Brackett <[hidden email]> wrote:
>>
>> R users,
>>
>>   Is anyone aware of the proper procedure for summarizing a script(your
>> complete list of functions, arguments , and error codes within your R
>> console for say a formal report or publication?
>>
>> Many thanks,
>>
>> Best wishes,
>>
>> Spencer Brackett
>>
>> ---------- Forwarded message ---------
>> From: CHATTON Anne via R-help <[hidden email]>
>> Date: Wed, Sep 26, 2018 at 6:03 AM
>> Subject: [R] Problems to obtain standardized betas in multiply-imputed data
>> To: [hidden email] <[hidden email]>
>>
>>
>> Dear all,
>>
>> I am having problems in obtaining standardized betas on a multiply-imputed
>> data set. Here are the codes I used :
>> imp = mice(data, 5, maxit=10, seed=42, print=FALSE)
>> FitImp <- with(imp,lm(y ~ x1 + x2 + x3))
>> Up to here everything is fine. But when I ask for the standardized
>> coefficients of the multiply-imputed regressions using this command :
>> sdBeta <- lm.beta(FitImp)
>> I get the following error message:
>> Error in b * sx : argument non numérique pour un opérateur binaire
>>
>> Can anyone help me with this please?
>>
>> Anne
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Summarizing R script

Duncan Murdoch-2
On 26/09/2018 10:24 AM, Spencer Graves wrote:

>
>
>         It depends on what you want, but I've found it very useful to
> create packages and submitting them to CRAN.  See "Creating R Packages"
> for how to do that.[1]  Part of this involves creating vignettes using
> Rmarkdown within RStudio.  Creating R packages and routinely running "R
> CMD check" sounds like it would take extra time.  My experience has been
> very much the opposite, because it dramatically reduces the bugs in my
> software and makes it vastly easier to find the bugs that still exist.
> AND I have something I can just hand to others, and they can use it.
> That would be exceedingly difficult otherwise.

I think that's very good advice.  Even if the R script is something not
suitable for publication on CRAN (containing proprietary data, or
solving one unique problem, for example), preparing it as though for
submission there enforces some good coding and documentation practices.

Duncan Murdoch

>
>
>         And there are publications like "R Journal" that are looking for
> descriptions of what you've done.  I have a paper in "R Journal"
> describing the "sos" package;  that article is a vignette in that
> package.  This process has worked for me.[2]
>
>
>          Spencer
>
>
> [1] Available from help.start().  See also
> "https://cran.r-project.org/doc/manuals/r-release/R-exts.html".
>
>
> [2] The "sos" package is the fastest literature search I know for
> anything statistical.  It's availability on CRAN combined with the R
> Journal article got me invited to help organize a plenary session on
> "Navigating the R Package Universe" at the useR!2017 conference in
> Brussels last year.  This is an example of how creating an R package
> with a vignette has helped me find an audience.
>
>
> On 2018-09-26 09:06, Roger Koenker wrote:
>> I use R CMD BATCH foo which produces a file called foo.Rout and provided the script includes
>> sessionInfo() constitutes a quite sufficient summary for my purposes, it isn’t exactly pretty, but it
>> is informative.
>>
>>> On Sep 26, 2018, at 3:00 PM, Spencer Brackett <[hidden email]> wrote:
>>>
>>> R users,
>>>
>>>    Is anyone aware of the proper procedure for summarizing a script(your
>>> complete list of functions, arguments , and error codes within your R
>>> console for say a formal report or publication?
>>>
>>> Many thanks,
>>>
>>> Best wishes,
>>>
>>> Spencer Brackett
>>>
>>> ---------- Forwarded message ---------
>>> From: CHATTON Anne via R-help <[hidden email]>
>>> Date: Wed, Sep 26, 2018 at 6:03 AM
>>> Subject: [R] Problems to obtain standardized betas in multiply-imputed data
>>> To: [hidden email] <[hidden email]>
>>>
>>>
>>> Dear all,
>>>
>>> I am having problems in obtaining standardized betas on a multiply-imputed
>>> data set. Here are the codes I used :
>>> imp = mice(data, 5, maxit=10, seed=42, print=FALSE)
>>> FitImp <- with(imp,lm(y ~ x1 + x2 + x3))
>>> Up to here everything is fine. But when I ask for the standardized
>>> coefficients of the multiply-imputed regressions using this command :
>>> sdBeta <- lm.beta(FitImp)
>>> I get the following error message:
>>> Error in b * sx : argument non numérique pour un opérateur binaire
>>>
>>> Can anyone help me with this please?
>>>
>>> Anne
>>>
>>> ______________________________________________
>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Summarizing R script

R help mailing list-2
In reply to this post by Spencer Brackett
I wonder if the lintr package might be helpful.

--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
Lab cell 925-724-7509
 
 

On 9/26/18, 7:00 AM, "R-help on behalf of Spencer Brackett" <[hidden email] on behalf of [hidden email]> wrote:

    R users,
   
      Is anyone aware of the proper procedure for summarizing a script(your
    complete list of functions, arguments , and error codes within your R
    console for say a formal report or publication?
   
    Many thanks,
   
    Best wishes,
   
    Spencer Brackett
   
    ---------- Forwarded message ---------
    From: CHATTON Anne via R-help <[hidden email]>
    Date: Wed, Sep 26, 2018 at 6:03 AM
    Subject: [R] Problems to obtain standardized betas in multiply-imputed data
    To: [hidden email] <[hidden email]>
   
   
    Dear all,
   
    I am having problems in obtaining standardized betas on a multiply-imputed
    data set. Here are the codes I used :
    imp = mice(data, 5, maxit=10, seed=42, print=FALSE)
    FitImp <- with(imp,lm(y ~ x1 + x2 + x3))
    Up to here everything is fine. But when I ask for the standardized
    coefficients of the multiply-imputed regressions using this command :
    sdBeta <- lm.beta(FitImp)
    I get the following error message:
    Error in b * sx : argument non numérique pour un opérateur binaire
   
    Can anyone help me with this please?
   
    Anne
   
    ______________________________________________
    [hidden email] mailing list -- To UNSUBSCRIBE and more, see
    https://stat.ethz.ch/mailman/listinfo/r-help
    PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
    and provide commented, minimal, self-contained, reproducible code.
   
    [[alternative HTML version deleted]]
   
    ______________________________________________
    [hidden email] mailing list -- To UNSUBSCRIBE and more, see
    https://stat.ethz.ch/mailman/listinfo/r-help
    PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
    and provide commented, minimal, self-contained, reproducible code.
   

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Summarizing R script

Bert Gunter-2
All suggestions made by others here are useful, but I would suggest that
computer scientists are probably a better -- or at least valuable
additional -- resource for this sort of knowledge than R programmers. A web
search on "self-documenting code" and/or "reproducible research" should
yield lots of relevant hits. For R specifically, the CRAN "Reproducible
Research" task view should be useful..

Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Wed, Sep 26, 2018 at 8:39 AM MacQueen, Don via R-help <
[hidden email]> wrote:

> I wonder if the lintr package might be helpful.
>
> --
> Don MacQueen
> Lawrence Livermore National Laboratory
> 7000 East Ave., L-627
> Livermore, CA 94550
> 925-423-1062
> Lab cell 925-724-7509
>
>
>
> On 9/26/18, 7:00 AM, "R-help on behalf of Spencer Brackett" <
> [hidden email] on behalf of [hidden email]>
> wrote:
>
>     R users,
>
>       Is anyone aware of the proper procedure for summarizing a script(your
>     complete list of functions, arguments , and error codes within your R
>     console for say a formal report or publication?
>
>     Many thanks,
>
>     Best wishes,
>
>     Spencer Brackett
>
>     ---------- Forwarded message ---------
>     From: CHATTON Anne via R-help <[hidden email]>
>     Date: Wed, Sep 26, 2018 at 6:03 AM
>     Subject: [R] Problems to obtain standardized betas in multiply-imputed
> data
>     To: [hidden email] <[hidden email]>
>
>
>     Dear all,
>
>     I am having problems in obtaining standardized betas on a
> multiply-imputed
>     data set. Here are the codes I used :
>     imp = mice(data, 5, maxit=10, seed=42, print=FALSE)
>     FitImp <- with(imp,lm(y ~ x1 + x2 + x3))
>     Up to here everything is fine. But when I ask for the standardized
>     coefficients of the multiply-imputed regressions using this command :
>     sdBeta <- lm.beta(FitImp)
>     I get the following error message:
>     Error in b * sx : argument non numérique pour un opérateur binaire
>
>     Can anyone help me with this please?
>
>     Anne
>
>     ______________________________________________
>     [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>     https://stat.ethz.ch/mailman/listinfo/r-help
>     PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
>     and provide commented, minimal, self-contained, reproducible code.
>
>         [[alternative HTML version deleted]]
>
>     ______________________________________________
>     [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>     https://stat.ethz.ch/mailman/listinfo/r-help
>     PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
>     and provide commented, minimal, self-contained, reproducible code.
>
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Problems to obtain standardized betas in multiply-imputed data

PaulJohnson32gmail
In reply to this post by R help mailing list-2
Greetings.
I would adjust approach  to calculate standardized estimates for each
imputed set. Then summarize them . The way you are doing it here implies
that standardization concept applies to model list, which seems doubtful.
The empirical std. dev. of the variables differs among imputed data sets,
after all.

I suppose I mean to say lm.beta is not intended to receive a list of
regressions. Put standardization in the with() work done on each imputed
set. I suspect it is as easy as putting lm.beta in there. If there is
trouble, I have a standardize function in the rockchalk package. Unlike
lm.beta, it actually standardizes variables and runs regression. lm.beta
resales coefficients instead.

Paul Johnson
University of Kansas

On Wed, Sep 26, 2018, 5:03 AM CHATTON Anne via R-help <[hidden email]>
wrote:

> Dear all,
>
> I am having problems in obtaining standardized betas on a multiply-imputed
> data set. Here are the codes I used :
> imp = mice(data, 5, maxit=10, seed=42, print=FALSE)
> FitImp <- with(imp,lm(y ~ x1 + x2 + x3))
> Up to here everything is fine. But when I ask for the standardized
> coefficients of the multiply-imputed regressions using this command :
> sdBeta <- lm.beta(FitImp)
> I get the following error message:
> Error in b * sx : argument non numérique pour un opérateur binaire
>
> Can anyone help me with this please?
>
> Anne
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Problems to obtain standardized betas in multiply-imputed data

PIKAL Petr
In reply to this post by R help mailing list-2
Hi

as I wrote I am not an expert in multiple imputation and others are probably more capable to give you an answer so please keep your emails coppied to the list.

The error message is straightforward and clear - object has to be of class lm

My wild guess is that you must not use the whole object "imp" but only the imputed data.frame. It is probably time for you to read documentation to mice package. It seems to me, that you can get data frame from mice object by function

?complete

and use that filled data frame for your lm model and lm.beta. But I may be completely wrong, I do not have any experience with mice.

Cheers
Petr

> -----Original Message-----
> From: CHATTON Anne <[hidden email]>
> Sent: Monday, October 8, 2018 12:52 PM
> To: PIKAL Petr <[hidden email]>
> Subject: RE: Problems to obtain standardized betas in multiply-imputed data
>
> Hi Petr,
> I apologize for the late reply and thank you very much for your judicious
> remarks.
> As you appropriately say, I also suspect that 'FitImp' is not an lm object. But the
> question of how to obtain these standardized values in the context of multiple
> imputations still remains.
> As requested, I am sending you herewith the output of the 'str' functions:
>
> imp = mice(Data, method = "norm.predict", m=5, seed=100, print=FALSE)
> FitImp <- with(imp,lm(y ~ x1 + x2 + x3))
> sdBeta <- lm.beta(FitImp)
> Error in lm.beta(FitImp) : object has to be of class lm
>
> > str(Data)
> 'data.frame':   996 obs. of  4 variables:
>  $ x3: num  18 18 18 18 18 19 19 19 19 20 ...
>  $ x2: num  12 27 20 55 31 24 43 31 25 43 ...
>  $ x1: num  NA NA NA NA NA NA NA NA NA NA ...
>  $ y : num  NA NA NA NA NA NA NA NA NA NA ...
>  - attr(*, "variable.labels")= Named chr
>   ..- attr(*, "names")= chr
>  - attr(*, "codepage")= int 65001
>
> > str(imp)
> List of 21
>  $ data           :'data.frame':        996 obs. of  4 variables:
>   ..$ x3: num [1:996] 18 18 18 18 18 19 19 19 19 20 ...
>   ..$ x2: num [1:996] 12 27 20 55 31 24 43 31 25 43 ...
>   ..$ x1: num [1:996] NA NA NA NA NA NA NA NA NA NA ...
>   ..$ y : num [1:996] NA NA NA NA NA NA NA NA NA NA ...
>   ..- attr(*, "variable.labels")= Named chr(0)
>   .. ..- attr(*, "names")= chr(0)
>   ..- attr(*, "codepage")= int 65001
>  $ imp            :List of 4
>   ..$ x3:'data.frame':  2 obs. of  5 variables:
>   .. ..$ 1: num [1:2] 26.6 33.9
>   .. ..$ 2: num [1:2] 26.6 33.9
>   .. ..$ 3: num [1:2] 26.6 33.9
>   .. ..$ 4: num [1:2] 26.6 33.9
>   .. ..$ 5: num [1:2] 26.6 33.9
>   ..$ x2:'data.frame':  2 obs. of  5 variables:
>   .. ..$ 1: num [1:2] 34.2 33.1
>   .. ..$ 2: num [1:2] 34.4 32.6
>   .. ..$ 3: num [1:2] 34 32.9
>   .. ..$ 4: num [1:2] 34.1 33.2
>   .. ..$ 5: num [1:2] 34.5 34.3
>   ..$ x1:'data.frame':  245 obs. of  5 variables:
>   .. ..$ 1: num [1:245] 6.39 12.97 9.9 25.32 14.5 ...
>   .. ..$ 2: num [1:245] 6.07 12.81 9.79 25.51 14.7 ...
>   .. ..$ 3: num [1:245] 6.39 12.79 9.54 25.41 14.63 ...
>   .. ..$ 4: num [1:245] 5.95 12.82 9.85 25.78 14.69 ...
>   .. ..$ 5: num [1:245] 5.83 13.01 9.76 25.49 14.7 ...
>   ..$ y :'data.frame':  244 obs. of  5 variables:
>   .. ..$ 1: num [1:244] 56.2 71.6 64.4 100.6 75.6 ...
>   .. ..$ 2: num [1:244] 55.9 71.5 64.3 100.8 75.8 ...
>   .. ..$ 3: num [1:244] 56.2 71.5 64.1 100.7 75.7 ...
>   .. ..$ 4: num [1:244] 55.8 71.5 64.4 101 75.7 ...
>   .. ..$ 5: num [1:244] 55.7 71.7 64.3 100.7 75.8 ...
>  $ m              : num 5
>  $ where          : logi [1:996, 1:4] FALSE FALSE FALSE FALSE FALSE FALSE ...
>   ..- attr(*, "dimnames")=List of 2
>   .. ..$ : chr [1:996] "1" "2" "3" "4" ...
>   .. ..$ : chr [1:4] "x3" "x2" "x1" "y"
>  $ blocks         :List of 4
>   ..$ x3: chr "x3"
>   ..$ x2: chr "x2"
>   ..$ x1: chr "x1"
>   ..$ y : chr "y"
>   ..- attr(*, "calltype")= Named chr [1:4] "type" "type" "type" "type"
>   .. ..- attr(*, "names")= chr [1:4] "x3" "x2" "x1" "y"
>  $ call           : language mice(data = Data, m = 5, method = "norm.predict",
> printFlag = FALSE, seed = 100)
>  $ nmis           : Named int [1:4] 2 2 245 244
>   ..- attr(*, "names")= chr [1:4] "x3" "x2" "x1" "y"
>  $ method         : Named chr [1:4] "norm.predict" "norm.predict"
> "norm.predict" "norm.predict"
>   ..- attr(*, "names")= chr [1:4] "x3" "x2" "x1" "y"
>  $ predictorMatrix: num [1:4, 1:4] 0 1 1 1 1 0 1 1 1 1 ...
>   ..- attr(*, "dimnames")=List of 2
>   .. ..$ : chr [1:4] "x3" "x2" "x1" "y"
>   .. ..$ : chr [1:4] "x3" "x2" "x1" "y"
>  $ visitSequence  : chr [1:4] "x3" "x2" "x1" "y"
>  $ formulas       :List of 4
>   ..$ x3:Class 'formula'  language x3 ~ 0 + x2 + x1 + y
>   .. .. ..- attr(*, ".Environment")=<environment: 0x000000000f0139c8>
>   ..$ x2:Class 'formula'  language x2 ~ 0 + x3 + x1 + y
>   .. .. ..- attr(*, ".Environment")=<environment: 0x000000000f0139c8>
>   ..$ x1:Class 'formula'  language x1 ~ 0 + x3 + x2 + y
>   .. .. ..- attr(*, ".Environment")=<environment: 0x000000000f0139c8>
>   ..$ y :Class 'formula'  language y ~ 0 + x3 + x2 + x1
>   .. .. ..- attr(*, ".Environment")=<environment: 0x000000000f0139c8>
>  $ post           : Named chr [1:4] "" "" "" ""
>   ..- attr(*, "names")= chr [1:4] "x3" "x2" "x1" "y"
>  $ blots          :List of 4
>   ..$ x3: list()
>   ..$ x2: list()
>   ..$ x1: list()
>   ..$ y : list()
>  $ seed           : num 100
>  $ iteration      : num 5
>  $ lastSeedValue  : int [1:626] 403 593 2082529872 -1076659723 770353271 -
> 83917670 1999705384 1490542154 -151817264 1924404941 ...
>  $ chainMean      : num [1:4, 1:5, 1:5] 31 32.6 15.2 73.1 30.4 ...
>   ..- attr(*, "dimnames")=List of 3
>   .. ..$ : chr [1:4] "x3" "x2" "x1" "y"
>   .. ..$ : chr [1:5] "1" "2" "3" "4" ...
>   .. ..$ : chr [1:5] "Chain 1" "Chain 2" "Chain 3" "Chain 4" ...
>  $ chainVar       : num [1:4, 1:5, 1:5] 19.621 0.105 80.049 116.363 20.278 ...
>   ..- attr(*, "dimnames")=List of 3
>   .. ..$ : chr [1:4] "x3" "x2" "x1" "y"
>   .. ..$ : chr [1:5] "1" "2" "3" "4" ...
>   .. ..$ : chr [1:5] "Chain 1" "Chain 2" "Chain 3" "Chain 4" ...
>  $ loggedEvents   : NULL
>  $ version        :Classes 'package_version', 'numeric_version'  hidden list of 1
>   ..$ : int [1:3] 3 3 0
>  $ date           : Date[1:1], format: "2018-10-08"
>  - attr(*, "class")= chr "mids"
>
> > str(FitImp)
> List of 4
>  $ call    : language with.mids(data = imp, expr = lm(y ~ x1 + x2 + x3))
>  $ call1   : language mice(data = Data, m = 5, method = "norm.predict",
> printFlag = FALSE, seed = 100)
>  $ nmis    : Named int [1:4] 2 2 245 244
>   ..- attr(*, "names")= chr [1:4] "x3" "x2" "x1" "y"
>  $ analyses:List of 5
>   ..$ :List of 12
>   .. ..$ coefficients : Named num [1:4] 44.917 0.957 0.611 -0.121
>   .. .. ..- attr(*, "names")= chr [1:4] "(Intercept)" "x1" "x2" "x3"
>   .. ..$ residuals    : Named num [1:996] 4.14e-12 -7.53e-13 -7.10e-14 2.89e-14
> 1.33e-14 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "1" "2" "3" "4" ...
>   .. ..$ effects      : Named num [1:996] -2.34e+03 4.44e+02 1.94e+02 -4.41e+01
> -1.07e-13 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "(Intercept)" "x1" "x2" "x3" ...
>   .. ..$ rank         : int 4
>   .. ..$ fitted.values: Named num [1:996] 56.2 71.6 64.4 100.6 75.6 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "1" "2" "3" "4" ...
>   .. ..$ assign       : int [1:4] 0 1 2 3
>   .. ..$ qr           :List of 5
>   .. .. ..$ qr   : num [1:996, 1:4] -31.5595 0.0317 0.0317 0.0317 0.0317 ...
>   .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. ..$ : chr [1:996] "1" "2" "3" "4" ...
>   .. .. .. .. ..$ : chr [1:4] "(Intercept)" "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "assign")= int [1:4] 0 1 2 3
>   .. .. ..$ qraux: num [1:4] 1.03 1 1.03 1.04
>   .. .. ..$ pivot: int [1:4] 1 2 3 4
>   .. .. ..$ tol  : num 1e-07
>   .. .. ..$ rank : int 4
>   .. .. ..- attr(*, "class")= chr "qr"
>   .. ..$ df.residual  : int 992
>   .. ..$ xlevels      : Named list()
>   .. ..$ call         : language lm(formula = y ~ x1 + x2 + x3)
>   .. ..$ terms        :Classes 'terms', 'formula'  language y ~ x1 + x2 + x3
>   .. .. .. ..- attr(*, "variables")= language list(y, x1, x2, x3)
>   .. .. .. ..- attr(*, "factors")= int [1:4, 1:3] 0 1 0 0 0 0 1 0 0 0 ...
>   .. .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. .. ..$ : chr [1:4] "y" "x1" "x2" "x3"
>   .. .. .. .. .. ..$ : chr [1:3] "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "term.labels")= chr [1:3] "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "order")= int [1:3] 1 1 1
>   .. .. .. ..- attr(*, "intercept")= int 1
>   .. .. .. ..- attr(*, "response")= int 1
>   .. .. .. ..- attr(*, ".Environment")=<environment: 0x000000000eeefd48>
>   .. .. .. ..- attr(*, "predvars")= language list(y, x1, x2, x3)
>   .. .. .. ..- attr(*, "dataClasses")= Named chr [1:4] "numeric" "numeric"
> "numeric" "numeric"
>   .. .. .. .. ..- attr(*, "names")= chr [1:4] "y" "x1" "x2" "x3"
>   .. ..$ model        :'data.frame':    996 obs. of  4 variables:
>   .. .. ..$ y : num [1:996] 56.2 71.6 64.4 100.6 75.6 ...
>   .. .. ..$ x1: num [1:996] 6.39 12.97 9.9 25.32 14.5 ...
>   .. .. ..$ x2: num [1:996] 12 27 20 55 31 24 43 31 25 43 ...
>   .. .. ..$ x3: num [1:996] 18 18 18 18 18 19 19 19 19 20 ...
>   .. .. ..- attr(*, "terms")=Classes 'terms', 'formula'  language y ~ x1 + x2 + x3
>   .. .. .. .. ..- attr(*, "variables")= language list(y, x1, x2, x3)
>   .. .. .. .. ..- attr(*, "factors")= int [1:4, 1:3] 0 1 0 0 0 0 1 0 0 0 ...
>   .. .. .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. .. .. ..$ : chr [1:4] "y" "x1" "x2" "x3"
>   .. .. .. .. .. .. ..$ : chr [1:3] "x1" "x2" "x3"
>   .. .. .. .. ..- attr(*, "term.labels")= chr [1:3] "x1" "x2" "x3"
>   .. .. .. .. ..- attr(*, "order")= int [1:3] 1 1 1
>   .. .. .. .. ..- attr(*, "intercept")= int 1
>   .. .. .. .. ..- attr(*, "response")= int 1
>   .. .. .. .. ..- attr(*, ".Environment")=<environment: 0x000000000eeefd48>
>   .. .. .. .. ..- attr(*, "predvars")= language list(y, x1, x2, x3)
>   .. .. .. .. ..- attr(*, "dataClasses")= Named chr [1:4] "numeric" "numeric"
> "numeric" "numeric"
>   .. .. .. .. .. ..- attr(*, "names")= chr [1:4] "y" "x1" "x2" "x3"
>   .. ..- attr(*, "class")= chr "lm"
>   ..$ :List of 12
>   .. ..$ coefficients : Named num [1:4] 44.917 0.957 0.611 -0.121
>   .. .. ..- attr(*, "names")= chr [1:4] "(Intercept)" "x1" "x2" "x3"
>   .. ..$ residuals    : Named num [1:996] 4.59e-12 -9.08e-15 -9.95e-14 -3.33e-14
> -1.88e-14 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "1" "2" "3" "4" ...
>   .. ..$ effects      : Named num [1:996] -2.34e+03 4.44e+02 1.94e+02 -4.41e+01
> -1.51e-13 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "(Intercept)" "x1" "x2" "x3" ...
>   .. ..$ rank         : int 4
>   .. ..$ fitted.values: Named num [1:996] 55.9 71.5 64.3 100.8 75.8 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "1" "2" "3" "4" ...
>   .. ..$ assign       : int [1:4] 0 1 2 3
>   .. ..$ qr           :List of 5
>   .. .. ..$ qr   : num [1:996, 1:4] -31.5595 0.0317 0.0317 0.0317 0.0317 ...
>   .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. ..$ : chr [1:996] "1" "2" "3" "4" ...
>   .. .. .. .. ..$ : chr [1:4] "(Intercept)" "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "assign")= int [1:4] 0 1 2 3
>   .. .. ..$ qraux: num [1:4] 1.03 1 1.03 1.04
>   .. .. ..$ pivot: int [1:4] 1 2 3 4
>   .. .. ..$ tol  : num 1e-07
>   .. .. ..$ rank : int 4
>   .. .. ..- attr(*, "class")= chr "qr"
>   .. ..$ df.residual  : int 992
>   .. ..$ xlevels      : Named list()
>   .. ..$ call         : language lm(formula = y ~ x1 + x2 + x3)
>   .. ..$ terms        :Classes 'terms', 'formula'  language y ~ x1 + x2 + x3
>   .. .. .. ..- attr(*, "variables")= language list(y, x1, x2, x3)
>   .. .. .. ..- attr(*, "factors")= int [1:4, 1:3] 0 1 0 0 0 0 1 0 0 0 ...
>   .. .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. .. ..$ : chr [1:4] "y" "x1" "x2" "x3"
>   .. .. .. .. .. ..$ : chr [1:3] "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "term.labels")= chr [1:3] "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "order")= int [1:3] 1 1 1
>   .. .. .. ..- attr(*, "intercept")= int 1
>   .. .. .. ..- attr(*, "response")= int 1
>   .. .. .. ..- attr(*, ".Environment")=<environment: 0x000000000ee25f90>
>   .. .. .. ..- attr(*, "predvars")= language list(y, x1, x2, x3)
>   .. .. .. ..- attr(*, "dataClasses")= Named chr [1:4] "numeric" "numeric"
> "numeric" "numeric"
>   .. .. .. .. ..- attr(*, "names")= chr [1:4] "y" "x1" "x2" "x3"
>   .. ..$ model        :'data.frame':    996 obs. of  4 variables:
>   .. .. ..$ y : num [1:996] 55.9 71.5 64.3 100.8 75.8 ...
>   .. .. ..$ x1: num [1:996] 6.07 12.81 9.79 25.51 14.7 ...
>   .. .. ..$ x2: num [1:996] 12 27 20 55 31 24 43 31 25 43 ...
>   .. .. ..$ x3: num [1:996] 18 18 18 18 18 19 19 19 19 20 ...
>   .. .. ..- attr(*, "terms")=Classes 'terms', 'formula'  language y ~ x1 + x2 + x3
>   .. .. .. .. ..- attr(*, "variables")= language list(y, x1, x2, x3)
>   .. .. .. .. ..- attr(*, "factors")= int [1:4, 1:3] 0 1 0 0 0 0 1 0 0 0 ...
>   .. .. .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. .. .. ..$ : chr [1:4] "y" "x1" "x2" "x3"
>   .. .. .. .. .. .. ..$ : chr [1:3] "x1" "x2" "x3"
>   .. .. .. .. ..- attr(*, "term.labels")= chr [1:3] "x1" "x2" "x3"
>   .. .. .. .. ..- attr(*, "order")= int [1:3] 1 1 1
>   .. .. .. .. ..- attr(*, "intercept")= int 1
>   .. .. .. .. ..- attr(*, "response")= int 1
>   .. .. .. .. ..- attr(*, ".Environment")=<environment: 0x000000000ee25f90>
>   .. .. .. .. ..- attr(*, "predvars")= language list(y, x1, x2, x3)
>   .. .. .. .. ..- attr(*, "dataClasses")= Named chr [1:4] "numeric" "numeric"
> "numeric" "numeric"
>   .. .. .. .. .. ..- attr(*, "names")= chr [1:4] "y" "x1" "x2" "x3"
>   .. ..- attr(*, "class")= chr "lm"
>   ..$ :List of 12
>   .. ..$ coefficients : Named num [1:4] 44.917 0.957 0.611 -0.121
>   .. .. ..- attr(*, "names")= chr [1:4] "(Intercept)" "x1" "x2" "x3"
>   .. ..$ residuals    : Named num [1:996] 3.54e-12 -9.01e-14 -6.32e-14 1.80e-14
> 1.59e-14 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "1" "2" "3" "4" ...
>   .. ..$ effects      : Named num [1:996] -2.34e+03 4.44e+02 1.94e+02 -4.41e+01
> -8.79e-14 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "(Intercept)" "x1" "x2" "x3" ...
>   .. ..$ rank         : int 4
>   .. ..$ fitted.values: Named num [1:996] 56.2 71.5 64.1 100.7 75.7 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "1" "2" "3" "4" ...
>   .. ..$ assign       : int [1:4] 0 1 2 3
>   .. ..$ qr           :List of 5
>   .. .. ..$ qr   : num [1:996, 1:4] -31.5595 0.0317 0.0317 0.0317 0.0317 ...
>   .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. ..$ : chr [1:996] "1" "2" "3" "4" ...
>   .. .. .. .. ..$ : chr [1:4] "(Intercept)" "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "assign")= int [1:4] 0 1 2 3
>   .. .. ..$ qraux: num [1:4] 1.03 1 1.03 1.04
>   .. .. ..$ pivot: int [1:4] 1 2 3 4
>   .. .. ..$ tol  : num 1e-07
>   .. .. ..$ rank : int 4
>   .. .. ..- attr(*, "class")= chr "qr"
>   .. ..$ df.residual  : int 992
>   .. ..$ xlevels      : Named list()
>   .. ..$ call         : language lm(formula = y ~ x1 + x2 + x3)
>   .. ..$ terms        :Classes 'terms', 'formula'  language y ~ x1 + x2 + x3
>   .. .. .. ..- attr(*, "variables")= language list(y, x1, x2, x3)
>   .. .. .. ..- attr(*, "factors")= int [1:4, 1:3] 0 1 0 0 0 0 1 0 0 0 ...
>   .. .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. .. ..$ : chr [1:4] "y" "x1" "x2" "x3"
>   .. .. .. .. .. ..$ : chr [1:3] "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "term.labels")= chr [1:3] "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "order")= int [1:3] 1 1 1
>   .. .. .. ..- attr(*, "intercept")= int 1
>   .. .. .. ..- attr(*, "response")= int 1
>   .. .. .. ..- attr(*, ".Environment")=<environment: 0x000000000c2916d0>
>   .. .. .. ..- attr(*, "predvars")= language list(y, x1, x2, x3)
>   .. .. .. ..- attr(*, "dataClasses")= Named chr [1:4] "numeric" "numeric"
> "numeric" "numeric"
>   .. .. .. .. ..- attr(*, "names")= chr [1:4] "y" "x1" "x2" "x3"
>   .. ..$ model        :'data.frame':    996 obs. of  4 variables:
>   .. .. ..$ y : num [1:996] 56.2 71.5 64.1 100.7 75.7 ...
>   .. .. ..$ x1: num [1:996] 6.39 12.79 9.54 25.41 14.63 ...
>   .. .. ..$ x2: num [1:996] 12 27 20 55 31 24 43 31 25 43 ...
>   .. .. ..$ x3: num [1:996] 18 18 18 18 18 19 19 19 19 20 ...
>   .. .. ..- attr(*, "terms")=Classes 'terms', 'formula'  language y ~ x1 + x2 + x3
>   .. .. .. .. ..- attr(*, "variables")= language list(y, x1, x2, x3)
>   .. .. .. .. ..- attr(*, "factors")= int [1:4, 1:3] 0 1 0 0 0 0 1 0 0 0 ...
>   .. .. .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. .. .. ..$ : chr [1:4] "y" "x1" "x2" "x3"
>   .. .. .. .. .. .. ..$ : chr [1:3] "x1" "x2" "x3"
>   .. .. .. .. ..- attr(*, "term.labels")= chr [1:3] "x1" "x2" "x3"
>   .. .. .. .. ..- attr(*, "order")= int [1:3] 1 1 1
>   .. .. .. .. ..- attr(*, "intercept")= int 1
>   .. .. .. .. ..- attr(*, "response")= int 1
>   .. .. .. .. ..- attr(*, ".Environment")=<environment: 0x000000000c2916d0>
>   .. .. .. .. ..- attr(*, "predvars")= language list(y, x1, x2, x3)
>   .. .. .. .. ..- attr(*, "dataClasses")= Named chr [1:4] "numeric" "numeric"
> "numeric" "numeric"
>   .. .. .. .. .. ..- attr(*, "names")= chr [1:4] "y" "x1" "x2" "x3"
>   .. ..- attr(*, "class")= chr "lm"
>   ..$ :List of 12
>   .. ..$ coefficients : Named num [1:4] 44.917 0.957 0.611 -0.121
>   .. .. ..- attr(*, "names")= chr [1:4] "(Intercept)" "x1" "x2" "x3"
>   .. ..$ residuals    : Named num [1:996] 4.33e-12 1.59e-12 -4.68e-13 7.83e-14
> 2.85e-15 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "1" "2" "3" "4" ...
>   .. ..$ effects      : Named num [1:996] -2.34e+03 4.44e+02 1.94e+02 -4.41e+01
> -1.27e-13 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "(Intercept)" "x1" "x2" "x3" ...
>   .. ..$ rank         : int 4
>   .. ..$ fitted.values: Named num [1:996] 55.8 71.5 64.4 101 75.7 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "1" "2" "3" "4" ...
>   .. ..$ assign       : int [1:4] 0 1 2 3
>   .. ..$ qr           :List of 5
>   .. .. ..$ qr   : num [1:996, 1:4] -31.5595 0.0317 0.0317 0.0317 0.0317 ...
>   .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. ..$ : chr [1:996] "1" "2" "3" "4" ...
>   .. .. .. .. ..$ : chr [1:4] "(Intercept)" "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "assign")= int [1:4] 0 1 2 3
>   .. .. ..$ qraux: num [1:4] 1.03 1 1.03 1.04
>   .. .. ..$ pivot: int [1:4] 1 2 3 4
>   .. .. ..$ tol  : num 1e-07
>   .. .. ..$ rank : int 4
>   .. .. ..- attr(*, "class")= chr "qr"
>   .. ..$ df.residual  : int 992
>   .. ..$ xlevels      : Named list()
>   .. ..$ call         : language lm(formula = y ~ x1 + x2 + x3)
>   .. ..$ terms        :Classes 'terms', 'formula'  language y ~ x1 + x2 + x3
>   .. .. .. ..- attr(*, "variables")= language list(y, x1, x2, x3)
>   .. .. .. ..- attr(*, "factors")= int [1:4, 1:3] 0 1 0 0 0 0 1 0 0 0 ...
>   .. .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. .. ..$ : chr [1:4] "y" "x1" "x2" "x3"
>   .. .. .. .. .. ..$ : chr [1:3] "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "term.labels")= chr [1:3] "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "order")= int [1:3] 1 1 1
>   .. .. .. ..- attr(*, "intercept")= int 1
>   .. .. .. ..- attr(*, "response")= int 1
>   .. .. .. ..- attr(*, ".Environment")=<environment: 0x000000000e870a48>
>   .. .. .. ..- attr(*, "predvars")= language list(y, x1, x2, x3)
>   .. .. .. ..- attr(*, "dataClasses")= Named chr [1:4] "numeric" "numeric"
> "numeric" "numeric"
>   .. .. .. .. ..- attr(*, "names")= chr [1:4] "y" "x1" "x2" "x3"
>   .. ..$ model        :'data.frame':    996 obs. of  4 variables:
>   .. .. ..$ y : num [1:996] 55.8 71.5 64.4 101 75.7 ...
>   .. .. ..$ x1: num [1:996] 5.95 12.82 9.85 25.78 14.69 ...
>   .. .. ..$ x2: num [1:996] 12 27 20 55 31 24 43 31 25 43 ...
>   .. .. ..$ x3: num [1:996] 18 18 18 18 18 19 19 19 19 20 ...
>   .. .. ..- attr(*, "terms")=Classes 'terms', 'formula'  language y ~ x1 + x2 + x3
>   .. .. .. .. ..- attr(*, "variables")= language list(y, x1, x2, x3)
>   .. .. .. .. ..- attr(*, "factors")= int [1:4, 1:3] 0 1 0 0 0 0 1 0 0 0 ...
>   .. .. .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. .. .. ..$ : chr [1:4] "y" "x1" "x2" "x3"
>   .. .. .. .. .. .. ..$ : chr [1:3] "x1" "x2" "x3"
>   .. .. .. .. ..- attr(*, "term.labels")= chr [1:3] "x1" "x2" "x3"
>   .. .. .. .. ..- attr(*, "order")= int [1:3] 1 1 1
>   .. .. .. .. ..- attr(*, "intercept")= int 1
>   .. .. .. .. ..- attr(*, "response")= int 1
>   .. .. .. .. ..- attr(*, ".Environment")=<environment: 0x000000000e870a48>
>   .. .. .. .. ..- attr(*, "predvars")= language list(y, x1, x2, x3)
>   .. .. .. .. ..- attr(*, "dataClasses")= Named chr [1:4] "numeric" "numeric"
> "numeric" "numeric"
>   .. .. .. .. .. ..- attr(*, "names")= chr [1:4] "y" "x1" "x2" "x3"
>   .. ..- attr(*, "class")= chr "lm"
>   ..$ :List of 12
>   .. ..$ coefficients : Named num [1:4] 44.917 0.957 0.611 -0.121
>   .. .. ..- attr(*, "names")= chr [1:4] "(Intercept)" "x1" "x2" "x3"
>   .. ..$ residuals    : Named num [1:996] 4.78e-12 2.82e-12 -2.51e-13 -1.75e-16
> 6.59e-15 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "1" "2" "3" "4" ...
>   .. ..$ effects      : Named num [1:996] -2.34e+03 4.44e+02 1.94e+02 -4.41e+01
> -1.35e-13 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "(Intercept)" "x1" "x2" "x3" ...
>   .. ..$ rank         : int 4
>   .. ..$ fitted.values: Named num [1:996] 55.7 71.7 64.3 100.7 75.8 ...
>   .. .. ..- attr(*, "names")= chr [1:996] "1" "2" "3" "4" ...
>   .. ..$ assign       : int [1:4] 0 1 2 3
>   .. ..$ qr           :List of 5
>   .. .. ..$ qr   : num [1:996, 1:4] -31.5595 0.0317 0.0317 0.0317 0.0317 ...
>   .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. ..$ : chr [1:996] "1" "2" "3" "4" ...
>   .. .. .. .. ..$ : chr [1:4] "(Intercept)" "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "assign")= int [1:4] 0 1 2 3
>   .. .. ..$ qraux: num [1:4] 1.03 1 1.03 1.04
>   .. .. ..$ pivot: int [1:4] 1 2 3 4
>   .. .. ..$ tol  : num 1e-07
>   .. .. ..$ rank : int 4
>   .. .. ..- attr(*, "class")= chr "qr"
>   .. ..$ df.residual  : int 992
>   .. ..$ xlevels      : Named list()
>   .. ..$ call         : language lm(formula = y ~ x1 + x2 + x3)
>   .. ..$ terms        :Classes 'terms', 'formula'  language y ~ x1 + x2 + x3
>   .. .. .. ..- attr(*, "variables")= language list(y, x1, x2, x3)
>   .. .. .. ..- attr(*, "factors")= int [1:4, 1:3] 0 1 0 0 0 0 1 0 0 0 ...
>   .. .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. .. ..$ : chr [1:4] "y" "x1" "x2" "x3"
>   .. .. .. .. .. ..$ : chr [1:3] "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "term.labels")= chr [1:3] "x1" "x2" "x3"
>   .. .. .. ..- attr(*, "order")= int [1:3] 1 1 1
>   .. .. .. ..- attr(*, "intercept")= int 1
>   .. .. .. ..- attr(*, "response")= int 1
>   .. .. .. ..- attr(*, ".Environment")=<environment: 0x000000000c5b6b88>
>   .. .. .. ..- attr(*, "predvars")= language list(y, x1, x2, x3)
>   .. .. .. ..- attr(*, "dataClasses")= Named chr [1:4] "numeric" "numeric"
> "numeric" "numeric"
>   .. .. .. .. ..- attr(*, "names")= chr [1:4] "y" "x1" "x2" "x3"
>   .. ..$ model        :'data.frame':    996 obs. of  4 variables:
>   .. .. ..$ y : num [1:996] 55.7 71.7 64.3 100.7 75.8 ...
>   .. .. ..$ x1: num [1:996] 5.83 13.01 9.76 25.49 14.7 ...
>   .. .. ..$ x2: num [1:996] 12 27 20 55 31 24 43 31 25 43 ...
>   .. .. ..$ x3: num [1:996] 18 18 18 18 18 19 19 19 19 20 ...
>   .. .. ..- attr(*, "terms")=Classes 'terms', 'formula'  language y ~ x1 + x2 + x3
>   .. .. .. .. ..- attr(*, "variables")= language list(y, x1, x2, x3)
>   .. .. .. .. ..- attr(*, "factors")= int [1:4, 1:3] 0 1 0 0 0 0 1 0 0 0 ...
>   .. .. .. .. .. ..- attr(*, "dimnames")=List of 2
>   .. .. .. .. .. .. ..$ : chr [1:4] "y" "x1" "x2" "x3"
>   .. .. .. .. .. .. ..$ : chr [1:3] "x1" "x2" "x3"
>   .. .. .. .. ..- attr(*, "term.labels")= chr [1:3] "x1" "x2" "x3"
>   .. .. .. .. ..- attr(*, "order")= int [1:3] 1 1 1
>   .. .. .. .. ..- attr(*, "intercept")= int 1
>   .. .. .. .. ..- attr(*, "response")= int 1
>   .. .. .. .. ..- attr(*, ".Environment")=<environment: 0x000000000c5b6b88>
>   .. .. .. .. ..- attr(*, "predvars")= language list(y, x1, x2, x3)
>   .. .. .. .. ..- attr(*, "dataClasses")= Named chr [1:4] "numeric" "numeric"
> "numeric" "numeric"
>   .. .. .. .. .. ..- attr(*, "names")= chr [1:4] "y" "x1" "x2" "x3"
>   .. ..- attr(*, "class")= chr "lm"
>  - attr(*, "class")= chr [1:2] "mira" "matrix"
>
> Thank you,
>
> Anne
>
> -----Message d'origine-----
> De : PIKAL Petr [mailto:[hidden email]]
> Envoyé : jeudi, 27 septembre 2018 09:20
> À : CHATTON Anne <[hidden email]>
> Objet : RE: Problems to obtain standardized betas in multiply-imputed data
>
> Hi
>
> I am not an expert in multiple imputation but from mice help page the
> resulting object is not a simple data frame. lm does not complain but maybe
> FitImp is not "standard" lm object.
>
> Without detailed info about used objects it is difficult to tell what is reason for
> error.
>
> You should send us result (or part) of
>
> str(data)
> str(imp)
> str(FitImp)
>
> to get better answer.
>
> Cheers
> Petr
>
> > -----Original Message-----
> > From: R-help <[hidden email]> On Behalf Of CHATTON Anne
> > via R-help
> > Sent: Wednesday, September 26, 2018 10:43 AM
> > To: [hidden email]
> > Subject: [R] Problems to obtain standardized betas in multiply-imputed
> > data
> >
> > Dear all,
> >
> > I am having problems in obtaining standardized betas on a
> > multiply-imputed data set. Here are the codes I used :
> > imp = mice(data, 5, maxit=10, seed=42, print=FALSE)
> > FitImp <-  with(imp,lm(y ~ x1 + x2 + x3)) Up to here everything is fine. But
> when
> > I ask for the standardized coefficients of the multiply-imputed
> > regressions using this command :
> > sdBeta <- lm.beta(FitImp)
> > I get the following error message:
> > Error in b * sx : argument non numérique pour un opérateur binaire
> >
> > Can anyone help me with this please?
> >
> > Anne
> >
> > ______________________________________________
> > [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> Osobní údaje: Informace o zpracování a ochraně osobních údajů obchodních
> partnerů PRECHEZA a.s. jsou zveřejněny na: https://www.precheza.cz/zasady-
> ochrany-osobnich-udaju/ | Information about processing and protection of
> business partner’s personal data are available on website:
> https://www.precheza.cz/en/personal-data-protection-principles/
> Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné
> a podléhají tomuto právně závaznému prohláąení o vyloučení odpovědnosti:
> https://www.precheza.cz/01-dovetek/ | This email and any documents
> attached to it may be confidential and are subject to the legally binding
> disclaimer: https://www.precheza.cz/en/01-disclaimer/

Osobní údaje: Informace o zpracování a ochraně osobních údajů obchodních partnerů PRECHEZA a.s. jsou zveřejněny na: https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information about processing and protection of business partner’s personal data are available on website: https://www.precheza.cz/en/personal-data-protection-principles/
Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a podléhají tomuto právně závaznému prohláąení o vyloučení odpovědnosti: https://www.precheza.cz/01-dovetek/ | This email and any documents attached to it may be confidential and are subject to the legally binding disclaimer: https://www.precheza.cz/en/01-disclaimer/

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.