Displaying 20 results from an estimated 8000 matches similar to: "Weighted SD"
2009 Oct 29
2
sample weight for box plot?
Hi,
I would like to make a box and whisker plot but use a sample weight for each
observation. I've searched around a bit and have not found a method of
doing this.
Anyone have any advice?
Thanks much,
Sean Parks
--
View this message in context: http://www.nabble.com/sample-weight-for-box-plot--tp26104205p26104205.html
Sent from the R help mailing list archive at Nabble.com.
2010 Feb 26
2
t-distribution values
Dear all,
how to calculate values of t-distribution for given values of d.f. using R
functions?
Anton
2007 May 31
3
Problem with Weighted Variance in Hmisc
The function wtd.var(x,w) in Hmisc calculates the weighted variance of x
where w are the weights. It appears to me that wtd.var(x,w) = var(x) if all
of the weights are equal, but this does not appear to be the case. Can
someone point out to me where I am going wrong here? Thanks.
Tom La Bone
[[alternative HTML version deleted]]
2011 Mar 02
2
Creating a weighted sample - Help
Hi
I'm new to R and most things I want to do I can do but I'm stuck on how to
weight a sample. I have had a look through the post but I can't find
anything that addresses my specific problem. I am wanting to scale up a
sample which has been taken based on a single variable (perf) which has 4
attributes H,I, J and K. The make up of the sample is shown below:-
Perf Factored
2006 Jan 12
2
tapply and weighted means
I' m trying to compute weighted mean on different
groups but it only returns NA. If I use the following
data.frame truc:
x y w
1 1 1
1 2 2
1 3 1
1 4 2
0 2 1
0 3 2
0 4 1
0 5 1
where x is a factor, and then use the command :
tapply(truc$y,list(truc$x),wtd.mean, weights=truc$w)
I just get NA. What's the problem ? What can I do ?
2009 Jan 19
1
conditional weighted quintiles
Dear All,
I am economist and working on poverty / income inequality. I need descriptive
statitics like the ratio of education expentitures between different income
quintiles where each household has a different weight. After a bit of
google search I found 'Hmisc' and 'quantreg' libraries for weighted quantiles.
The problem is that these packages give me only weighted quintiles;
2009 Sep 05
1
several questions about R graphic properties
I have a several questions about R graphic properties.
I use a "barplot2" function for creating plots with error bars. My data include species' names in first column, and I need make plots for each species. I know how to select species for each plot:
D<-read.table("FD_R.txt", h=T)
Dens<-D[D[,1]=="Sit.eur",]
but I want to make a cycle which will
2009 Nov 14
4
Weighted descriptives by levels of another variables
I've noticed that R has a number of very useful functions for
obtaining descriptive statistics on groups of variables, including
summary {stats}, describe {Hmisc}, and describe {psych}, but none that
I have found is able to provided weighted descriptives of subsets of a
data set (ex. descriptives for both males and females for age, where
accurate results require use of sampling
2017 Nov 24
0
number to volume weighted distribution
On 24/11/2017 6:27 AM, PIKAL Petr wrote:
> Dear all
>
> Strictly speaking it is not R question but as you are the most capable persons I know I give it a try.
>
> I am strugling with recalculation of number weighted to volume weighted distribution.
>
> Suppose I have objects (cubes) with size
>
> x<- c(rep(10,20), rep(100, 10), rep(300,5))
> I can get
>
2009 Nov 19
3
t-criterion calculation using means and SE
Dear all,
is there any functions which allow to calculate Student t-criterion using means, their SE and sample size? I've seek for, but bulit-in t-criterion works only with initial sample...
Best regards,
A.Morkovin
2017 Nov 24
2
number to volume weighted distribution
Hi Duncan
I tried Ecdf and/or wtd.quantile from Hmisc and it is working (probably).
Ecdf(x, q=.5)
Ecdf(x, weights=xw,col=2, add=T, q=.5)
wtd.quantile(x)
0% 25% 50% 75% 100%
10 10 10 100 300
wtd.quantile(x, weights=xw, type="i/n")
0% 25% 50% 75% 100%
10.0000 138.8667 192.5778 246.2889 300.0000
But could you please be more specific in this?
>
2003 Jul 31
1
help with tapply and weighted.mean
Hello!
I have data frame with 'weights' in one of the columns. I need to
compute weighted mean on another column other factor variable and
i am trying to:
res<-tapply(data$k,list(data$model),weighted.mean,w=data$w,na.rm=T)
and i get:
Warning messages:
1: longer object length
is not a multiple of shorter object length in: x * w
2: longer object length
is not a multiple of shorter
2017 Nov 24
0
number to volume weighted distribution
Hi Petr,
I think that Duncan suggests something like this:
x<- c(rep(10,20), rep(300,5), rep(100, 10))
tx <- table(x)
prop.x <- tx / sum(tx)
vx <- as.integer(names(tx))
prop.wx <- tx * vx / sum(tx * vx)
plot(ecdf(x))
plot(vx, cumsum(prop.x), ylim = 0:1)
plot(vx, cumsum(prop.wx), ylim = 0:1)
Best regards,
Thierry
ir. Thierry Onkelinx
Statisticus / Statistician
Vlaamse
2011 Apr 20
2
survexp with weights
Hello,
I probably have a syntax error in trying to generate an expected
survival curve from a weighted cox model, but I can't see it. I used
the help sample code to generate a weighted model, with the addition
of a "weights=albumin" argument (I only chose albumin because it had
no missing values, not because of any real relevance). Below are my
code with the resulting error
2017 Nov 24
2
number to volume weighted distribution
Dear all
Strictly speaking it is not R question but as you are the most capable persons I know I give it a try.
I am strugling with recalculation of number weighted to volume weighted distribution.
Suppose I have objects (cubes) with size
x<- c(rep(10,20), rep(100, 10), rep(300,5))
I can get
plot(ecdf(x))
or the number weighted average
mean(x)
[1] 77.14286
or volume weighted average
2010 Feb 12
1
Using seq_len() vs 1:n]
Pat Burns makes a good point. -Peter
-------- Original Message --------
Subject: Re: [R] Using seq_len() vs 1:n
Date: Fri, 12 Feb 2010 09:01:20 +0000
From: Patrick Burns <pburns at pburns.seanet.com>
To: Peter Ehlers <ehlers at ucalgary.ca>
References: <4B746AEF.10900 at ucalgary.ca>
If you want your code to be compatible with
S+, then 'seq_len' isn't going to work.
2006 May 31
2
a problem 'cor' function
Hi list,
One of my co-workers found this problem with 'cor' in his code and I confirm it too (see below). He's using R 2.2.1 under Win 2K and I'm using R 2.3.0 under Win XP.
===========================================
> R.Version()
$platform
[1] "i386-pc-mingw32"
$arch
[1] "i386"
$os
[1] "mingw32"
$system
[1] "i386, mingw32"
$status
2008 Nov 24
1
weighted ftable
I need to do some fairly deep tables, and ftable() offers most of what I
need, except for the weighting. With smaller samples, I've just used
replicate to let me have a weighted data set, but with this data set,
I'm afraid replicate is going to make my data set too big for R to
handle comfortably.
That being said, is there some way to weight my table (similar to
wtd.table) but offer the
2008 Oct 07
2
weighted quantiles
I have a set of values and their corresponding weights. I can use the
function weighted.mean to calculate the weighted mean, I would like to be
able to similarly calculate the weighted median and quantiles? Is there a
function in R that can do this?
thanks,
Spencer
[[alternative HTML version deleted]]
2011 Feb 10
2
Rioja package, creating transfer function, WA, "Error in FUN"
Hi, I am a new R user and am trying to construct a palaeoenvironmental
transfer function (weighted averaging method) using the package rioja.
I've managed to insert the two matrices (the species abundance and the
environmental data) and have assigned them to the y and x values
respectively. When I try and enter the 'WA' function though, I get an 'Error
in FUN' message (see