Page 1 of 1

[SOLVED] Problem with db.stat function for weighted samples

PostPosted: Sun Jan 12, 2014 10:53 am
by Costu
Hi all,

When i use the function
Code: Select all
db.stat(db, fun = "mean", names = NA, ngrep=NA, flag.mono=FALSE)

for compute descriptive statistics like mean and variance of a variable on weighted sample (option w=... in db.create function ) , i obtain the same result as unweighted sample. I seem that this function doesn't take a weight in a sample??

Futhermore, it is not possible to get the value of the result in db.stat function : we have just a printout!!

Thanks

Re: Problem with db.stat function for weighted samples

PostPosted: Sun Jan 12, 2014 6:53 pm
by Didier Renard
The weight has been added to this function.
Making this function to return the values is not done yet as it changes the R script

Re: Problem with db.stat function for weighted samples

PostPosted: Thu Jan 16, 2014 6:13 pm
by Didier Renard
The procedure db.stat has been modified in order to return (optionally) the vector or matrix containing the statistics.
It may also become silent.
Available in V9.1.11