bnlearn impute problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bnlearn impute problem

ross.chapman
Hi all,

 

I am having a problem running the "impute" function from the bnlearn
package.

 

I have tried running the example in the documentation  as follows:

 

with.missing.data = gaussian.test

with.missing.data[sample(nrow(with.missing.data), 500), "F"] = NA

fitted = bn.fit(model2network("[A][B][E][G][C|A:B][D|B][F|A:D:E:G]"),

           gaussian.test)

 

imputed = impute(fitted, with.missing.data)

 

Which then returns the error message:

 

Error: could not find function "impute"

 

Can you please indicate what I am doing wrong here?

 

My R version is:

 

platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                    
system         x86_64, mingw32            
status                                    
major          3                          
minor          3.1                        
year           2016                        
month          06                          
day            21                          
svn rev        70800                      
language       R                          
version.string R version 3.3.1 (2016-06-21)
nickname       Bug in Your Hair

 

My bnlearn version is 4.0.

 

Many thanks

 

Ross


        [[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.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bnlearn impute problem

Marco Scutari
Dear Ross,

On 17 March 2017 at 06:25,  <[hidden email]> wrote:
> I am having a problem running the "impute" function from the bnlearn
> package.

I assume you referred to the online documentation instead of the
manuals that come with the package? I included impute() in bnlearn
4.1, so you will have to upgrade to use it.

Cheers,
    Marco

--
Marco Scutari, Ph.D.
Lecturer in Statistics, Department of Statistics
University of Oxford, United Kingdom

______________________________________________
[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.
Loading...