CHATTON Anne
2018-Sep-26 08:42 UTC
[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
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 <r-help at r-project.org> Date: Wed, Sep 26, 2018 at 6:03 AM Subject: [R] Problems to obtain standardized betas in multiply-imputed data To: r-help at r-project.org <r-help at r-project.org> 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 ______________________________________________ R-help at r-project.org 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]]
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" <r-help-bounces at r-project.org on behalf of spbrackett20 at saintjosephhs.com> 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 <r-help at r-project.org> Date: Wed, Sep 26, 2018 at 6:03 AM Subject: [R] Problems to obtain standardized betas in multiply-imputed data To: r-help at r-project.org <r-help at r-project.org> 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 ______________________________________________ R-help at r-project.org 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]] ______________________________________________ R-help at r-project.org 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.
Paul Johnson
2018-Oct-05 08:46 UTC
[R] Problems to obtain standardized betas in multiply-imputed data
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 <r-help at r-project.org> 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 > > ______________________________________________ > R-help at r-project.org 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]]