Displaying 20 results from an estimated 6867 matches for "weightings".
Did you mean:
weighting
2000 Jan 04
0
Stepwise logistic discrimination - II
I apologise for writing again about the problem with using stepAIC +
multinom, but I think the reason why I had it in the first place is
perhaps there may be a bug in either stepAIC or multinom.
Just to repeat the problem, I have 126 variables and 99 cases. I don't
know if the large number of variables could be the problem. Of couse the
reason for doing a stepwise method is to reduce this
2002 Feb 06
4
Weighted median
Is there a weighted median function out there similar to weighted.mean()
but for medians? If not, I'll try implement or port it myself.
The need for a weighted median came from the following optimization
problem:
x* = arg_x min (a|x| + sum_{k=1}^n |x - b_k|)
where
a : is a *positive* real scalar
x : is a real scalar
n : is an integer
b_k: are negative and positive scalars
2011 Jan 17
2
Using summaryBy with weighted data
Dear Soren and R users:
I am trying to use the summaryBy function with weights. Is this possible? An example that illustrates what I am trying to do follows:
library(doBy)
## make up some data
response = rnorm(100)
group = c(rep(1,20), rep(2,20), rep(3,20), rep(4,20), rep(5,20))
weights = runif(100, 0, 1)
mydata = data.frame(response,group,weights)
## run summaryBy without weights:
2006 Aug 04
2
why does lm() not allow for negative weights?
Dear List,
Why do commonly used estimator functions (such as lm(), glm(), etc.) not
allow negative case weights? I suspect that there is a good reason for this.
Yet, I can see reasonable cases when one wants to use negative case weights.
Take lm() for example:
###
n <- 20
Y <- rnorm(n)
X <- cbind(rep(1,n),runif(n),rnorm(n))
Weights <- rnorm(n)
# Includes Pos and Neg Weights
Weights
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]]
2012 Oct 08
1
weighted cumulative distribution with ggplot2
Dear all,
I am trying to draw a weighted cumulative distribution (as defined
here http://rss.acs.unt.edu/Rdoc/library/spatstat/html/ewcdf.html)
with ggplot2
however the syntax
temp<-qplot(X,weight=weight,data=data,stat = "ecdf", geom =
"step",colour=factor(year))
seems not to produce exactly the right figure (the values seems higher
at some points)... I am wrong in the
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
2012 Jul 03
2
EM algorithm to find MLE of coeff in mixed effects model
I have a general question about coefficients estimation of the mixed model.
I simulated a very basic model: Y|b=X*\beta+Z*b +\sigma^2* diag(ni);
b follows
N(0,\psi) #i.e. bivariate normal
where b is the latent variable, Z and X are ni*2 design matrices, sigma is
the error variance,
Y are longitudinal data, i.e. there are ni
2008 Mar 10
3
Weighting data when running regressions
Dear R-Help,
I'm new to R and struggling with weighting data when I run regression. I've
tried to use search to solve my problem but haven't found anything helpful
so far.
I (successfully) import data from SPSS (15) and try to run a linear
regression on a subset of my data file where WEIGHT is the name of my
weighting variable (numeric), e.g.:
library(foreign)
2006 Aug 30
5
working with summarized data
The data sets I am working with all have a weight variable--e.g.,
each row doesn't mean 1 observation.
With that in mind, nearly all of the graphs and summary statistics
are incorrect for my data, because they don't take into account the
weight.
****
For example "median" is incorrect, as the quantiles aren't calculated
with weights:
sum( weights[X < median(X)] )
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]]
2005 Apr 13
1
logistic regression weights problem
Hi All,
I have a problem with weighted logistic regression. I have a number of
SNPs and a case/control scenario, but not all genotypes are as
"guaranteed" as others, so I am using weights to downsample the
importance of individuals whose genotype has been heavily "inferred".
My data is quite big, but with a dummy example:
> status <- c(1,1,1,0,0)
> SNPs <-
2011 Jul 06
2
how to best present concentrated data points/ ggplot2
Hi all,
I am trying to plot a weighted density plot for two different types and want to show the data points on the x axis.
The code is as follows. The data points are very concentrated. Is there a better way to present it( should I set the alpha value or something else)?
Thanks!
YL
library(ggplot2)
x <- rnorm(10000)
a <- rnorm(5000)
b <- rnorm(5000)
weights.x <- abs(a/sum(a))
2017 May 11
2
What's the weight means in the dump of edge info from USR2?
Thank you, that is very helpful. And actually I do have a few further questions regarding this:
1. This weight is not the one specified in Subnet, this should be something related to the host, where can I manually configure this?
2. The weight value is ONLY take round trip latency as the measurement, or including CPU power and other factors into consideration?
3. I don't know how this
2012 Jul 18
1
How does "rlm" in R decide its "w" weights for each IRLS iteration?
Hi all,
I am also confused about the manual:
a. The input arguments:
wt.method are the weights case weights (giving the relative importance of
case, so a weight of 2 means there are two of these) or the inverse of the
variances, so a weight of two means this error is half as variable?
w (optional) initial down-weighting for each case.
init (optional) initial values for the
2009 Jul 23
5
Random # generator accuracy
Dan Nordlund wrote:
"It would be necessary to see the code for your 'brief test' before anyone
could meaningfully comment on your results. But your results for a single
test could have been a valid "random" result."
I've re-created what I did below. The problem appears to be with the
weighting process: the unweighted sample came out much closer to the actual
2008 Jun 03
3
Rpart and case weights: working with functions
I can't get rpart accept case weights defined inside a function.
It keeps using the copy defined in the "global" environment (if they
exists) instead of the function-defined ones.
Here is what I do:
test.function <- function (formula, data) {
weights <- rep(.1, 100)
rpart(formula, data, weights)
}
test.function(x~y, data)
And I get an error:
> Error in
2007 May 08
5
Weighted least squares
Dear all,
I'm struggling with weighted least squares, where something that I had
assumed to be true appears not to be the case. Take the following
data set as an example:
df <- data.frame(x = runif(100, 0, 100))
df$y <- df$x + 1 + rnorm(100, sd=15)
I had expected that:
summary(lm(y ~ x, data=df, weights=rep(2, 100)))
summary(lm(y ~ x, data=rbind(df,df)))
would be equivalent, but
2017 May 10
2
What's the weight means in the dump of edge info from USR2?
Hi, tinc experts
abc to def at x.x.x.x port 655 options d weight 540
How’s the 540 weight been calculated? What does it mean? How can I leverage this weight?
The d of after options mean direct?
2010 Apr 16
2
Weights in binomial glm
I have some questions about the use of weights in binomial glm as I am
not getting the results I would expect. In my case the weights I have
can be seen as 'replicate weights'; one respondent i in my dataset
corresponds to w[i] persons in the population. From the documentation
of the glm method, I understand that the weights can indeed be used
for this: "For a binomial GLM prior