Displaying 20 results from an estimated 10000 matches similar to: "weighted standard deviation"
2011 Dec 08
1
sum of deviations from the weighted mean
Hi all. I tried to calculate sum of deviations from the weighted mean and i
didn't get what i expected - 0. Here is an example:
> wt <- c(10,25,38,22,5)
> x <- 6:10
> wm <- weighted.mean(x,wt)
> (x-wm)*wt
[1] -18.70 -21.75 4.94 24.86 10.65
> sum((x-wm)*wt)
[1] -1.24345e-14
With simple mean I got 0:
> sum(x-mean(x))
[1] 0
Could someone explain me why we
2011 Jun 14
2
Standard deviation and Mean
Dear R-help,
Hi
I've got data table with variation and freqeuncy.
I don't know how to get mean and sd.
Please help me.
Cheers.
==========
variation frequency
0.503 79930
0.174 291140
-0.444 95916
-0.731 11451
0.453 102899
0.596 46133
-0.295 204859
0.013 390121
0.311 187552
-0.085 378902
-0.633 28164
0.175 291411
0.611 41903
0.318 183254
-0.661 22580
0.149 312574
0.594 46903
-0.557
2008 Oct 09
1
GWR Predictions' standard deviation
Dear all,
I would like to use a GWR model in order to spatially predict food
insecurity in Africa. I have a georeferenced village data-bases and I've run
a "classic" regression model (taking into account the spatial dependence of
the errors) that works fairly well for Niger that is a quite homogenous
country. Now, I would like to make the same thing for countries where it
should be
2007 Apr 18
0
Get the: "standard deviation" and "mean value" of 3D-measurments
Hello,
I have got a numeric matrix with three colums of a few measurments. My x and
y coordinates are rising numbers. The z coordinate is the measurment. In
my matrix if have got ~6000 sorted values for one measurments multiplied
with the number of measurments. An example in the end.
My aim is to get the "mean values" and "standard deviation" for each value
between the
2004 Feb 18
3
PNG Problem on Windows 98
Dear all,
with the new version of R it is normally no problem to produce very fast
graphics in the png format.
In the office i want to work with R - Windows 98 is used.
There are french versions and english versions of Windows 98 second edition.
The png graphics are only on one computer correct.
On the other computers - the x-axis labels, the legend text and the "mtext"
(on the
2011 Jan 10
2
Calculating Portfolio Standard deviation
Dear R helpers
I have following data
stocks <- c("ABC", "DEF", "GHI", "JKL")
prices_df <- data.frame(ABC = c(17,24,15,22,16,22,17,22,15,19),
DEF = c(22,28,20,20,28,26,29,18,24,21),
GHI = c(32,27,32,36,37,37,34,23,25,32),
2011 Jan 29
1
Problem in weighting standard deviations
Dear all,
I have a problem that has been driving me nuts. I have searched everywhere
but could not find a comprehensive answer. I only get (sometimes
contradictory) bits of information.
I have a series of measurements with associated standard deviations, e.g:
means +/- sd
10 +/- 0.2
13 +/- 0.4
09 +/- 0.3
The number of observations used to estimate any of these means was the same.
Let's say
2003 Aug 06
1
Standard error of standard deviation: bootstrap or theoretical results?
Dear R users,
This is more a statistical question rather than an R question. I'd
appreciate it if you can give me some suggestions.
I have a sample of a time series (sample size 500, fat tail in density). I
am trying to calculate the Standard error of standard deviation of a
sub-block-sample (sample size 250). I take 100 this kind of
sub-block-sample, randomly. For these 100 subsamples, I
2008 Oct 15
3
Standard deviation for rows
Hi everyone,
I have just started using R, and I have a simple question.
How can I get the Standard deviation for rows. basically I am looking for
something like "rowMeans()"
but for Standard deviation (I tried "rowSds()" didn't exist)
Thanks,
--
View this message in context: http://www.nabble.com/Standard-deviation-for-rows-tp19998106p19998106.html
Sent from the R
2007 Oct 21
2
scatter plot with 1 standard deviation for each point
Hi,
Could anyone give suggestions how to plot a scatter plot with 1 standard
deviation for each point. To make it clearer, here is a simple example: the
scatterplot is plot(X, Y), but I want to add 1 standard deviation according
to the value of Z for each Y.
X Y Z
1 3.5 1.1
. . .
. . .
. . .
Thanks a lot in advance.
FD
[[alternative HTML
2012 Aug 25
2
Standard deviation from MANOVA??
Hi,
I have problem getting the standard deviation from the manova output.
I have used the manova function: myfit <- manova(cbind(y1, y2) ~ x1
+ x2 + x3, data=mydata) .
I tried to get the predicted values and their standard deviation by using:
predict(myfit, type="response", se.fit=TRUE)
But the problem is that I don't get the standard deviation values, I only
2008 Aug 13
1
The standard deviation of measurement 1 with respect to measurement 2
Hi,
I have two (different types of) measurements, say X and Y, resulting from
the same set of experiments. So X and Y are paired: (x_1, y_1), (x_2, y_2),
...
I am trying to calculate the standard deviation of Y with respect to X. In
other words, in terms of the scatter plot of X and Y, I would like to divide
it into bins along the X-axis and for each bin calculate the standard
deviation along
2011 Oct 23
1
how to plot a distribution of mean and standard deviation
Hi,
I have the following data about courses (504) in a university, two
attributes about the proportion of resources used (#resources_used /
#resources_available), namely the average and the standard deviation.
Thus I have:
[1] n=504 rows
[2] 1 id column and 2 attributes
Here's a sample of the data:
courseid,average,std
12741,1,0
17161,1,0
12514,1,0
2008 Jul 09
1
"non-sample" standard-deviation
Hi,
R seems to use the "1/n-1"-factor calculating the standard-deviation sd().
If i wat to get the "non-sample" standard-deviation i use
sqrt(sd(x)^2*((n-1)/n))
Is there a parameter to get the sd()-function using the "1/n" factor
directly?
Or is there any other function to do so?
Thank you in advance :-)
Best,
Eli
2008 May 28
1
Grouped weighted.mean
Dear all --
I want to compute weighted.mean() for grouped rows.
Data frame extract is just below. For each Key, I want the mean of
IAC weighted by Wt.
DP0[1:20,]
Key
IAC Wt
2 C3-PD030020050.PD030020050.3.12.3.0 0.765 0.8590000
3 C3-PD030020050.PD030020050.3.12.3.0 0.764 0.8449651
4 C3-PD030020050.PD030020050.3.12.3.0
2008 Jul 23
2
Weighted variance function?
There is a R function to calculate weighted mean : weighted.mean() under
stats package. Is there any direct R function for calculating weighted
variance as well?
[[alternative HTML version deleted]]
2006 Jul 14
3
Generating random normal distribution with mean 0 and standard deviation 1
Hello,
This must be really simple, but I can't find it on R Site search. I need to
generate a random normally distributed series with mean 0 and sd 1. In
Matlab, this code is randn(n).
The closest I found is runif(20,-1,1) but this forces a maximum and a
minimum, and there's no way to specify a standard deviation of 1.
>sd(runif(20,-1,1))
[1] 0.578164
2012 Jul 24
4
Integrate(dnorm) with different mean and standard deviation help
I'm trying to provide different parameters to the integrate function for various probability functions. I'm using dnorm as the simplest example here. For instance integrate(dnorm, -1.96, 1.96) produces the correct answer for a normal distribution with mean 0 and standard deviation 1. I've tried two ways to use mean=2.0 and standard deviation 1, but with no luck. The examples follow.
2009 Dec 04
2
Standard deviation for each element in a set of matrices
Hello R-users,
I would like to know how to find the standard deviation for each element
in a set of matrices.
Given the following files,
File1 File2 File3
1 1 1 4 4 4 7 7 7
2 2 2 5 5 5 8 8 8
3 3 3 6 6 6 9 9 9
I want to calculate the standard deviation for every cell in the file
(I'm using gridded data). The desired output is
Output
3 3 3
3 3
2008 Sep 24
2
climatological standard deviation- (question re-posted)
Sorry for re-posting the question, I did not get any reply.
Kindly reply please if any one can.
###
Hello R users,
I have a montly time series over a several year period.
It's easy to compute a monthly climatology (12 values), Now, I would like to
calculate the corresponding standard deviation, ie the 12 values
calculated from the january values, february values, etc.
What's the best way