# Questions tagged [weights]

"Weights" may refer to: (1) observation weights that come from sample surveys -- consider tagging "survey-sampling"; (2) Monte Carlo sample weights that arise when sampling from intractable distributions -- consider tagging "weighted-sampling"; (3) variable weights in statistical or machine learning models such as regression, factor analysis, or learning networks -- consider tagging with that specific model. Other odd uses of weights go here.

358 questions
Filter by
Sorted by
Tagged with
1 vote
7 views

### How do I make a table that prints the Mean and its corresponding weight of a Gaussian Mixture model?

I am successfully generating weights and means for a GMM, but I'm trying to get the results to print in a way that shows the corresponding mean for a weight. Here's what I have now: ...
1 vote
28 views

### How error derivative becomes zero in gradient descent

Previous questions this & this does not answer my question Code ...
• 657
9 views

### weighting an hypothetical biased dataset

The topic is somewhat generic but I will try to specify it as much as possible. Theoretically, we have a dataset that being a survey could be biased (geographically, gender ...) in this case are about ...
• 73
81 views

### How do I calculate weights for weighted means?

I want the weighted mean of my dv, velocity. In this scenario, velocity is a derived/interpolated measure comprised of repeated measures of randomly sampled speeds in a given region. There will always ...
• 173
9 views

### How to apply weights to the the data of 1k sample to represent whole population when I am provided with weights?

Need help to understand: I have a citizen poll data that has entries about how people(male/female), age, employment status, education, country, opinion on current government, etc. now the company who ...
• 1
14 views

### Weighing observations in non-normalized dummy-variable penalized regression

I have a regression problem where things are either present or they're not, represented as {1, 0} in the X matrix. Normalization of X doesn't make sense intuitively, nor does it lead to "correct&...
52 views

### Combining standard errors of two separate variables

I have a dependent variable associated with a SE and an independent variable associated with a SE. I would like to weight my regression such that both of these SEs are taken into account. What is the ...
• 41
14 views

### Outputting the weighted version of a variable

Is it possible to apply weights to a variable (eg, the independent variable in a regression analysis) and then output the weighted version of this variable? I would like to weight both my dependent ...
• 41
35 views

### Weighting pharmacovigilance data in a meta-regression

I would like to run a meta-regression in which the independent variable is composed of weighted reported odds ratios (ie, the number of events for a particular medication side effect divided by total ...
• 41
14 views

### What does it mean when variables in in (probability) weighted regression are significant but variables in an unweighted regression are not?

I'm running to regressions. One with probability weights inputted and another one without. When running them, my results indicate that some unadjusted variables are insignificant, but those same ...
1 vote
26 views

### How to measure the "correlation" between two sequences of objects ordered by different criteria, considering higher positions as higher weights?

I suppose this is a pretty common problem since when we use ranks we are often more interested in how similar they are at the top (or at the bottom, or both extremes) than in how they compare in the ...
• 235
60 views

### Discordant results using IPW and overlap weights (propensity score approach) in sub-group analyses

I am investigating the effect of a treatment on the risk of a disease (% disease=18.5% (515/2784)). To do so, I use a propensity score (PS) approach with two different weights methods: IPW (stabilized ...
1 vote
12 views

### Oja's rule on convolutional layer

The Oja's rule for updating weights is defined as: $$\Delta \textbf{w} = \textbf{w}_{n+1} - \textbf{w}_{n} = \eta \textbf{y}_n(\textbf{x}_{n} - \textbf{y}_{n}\textbf{w}_{n})$$ where $\textbf{x}$ is ...
• 595
56 views

### The math behind svyglm() when we have weights and clusters

I want to apply survey::svyglm() to a scenario that we need to get the robust standard error in both weights and clusters. There is an example in survey R package: ...
1 vote
44 views

### How to do competing risks regression after IPW?

There are 4 types of treatment in my data. To balance the covariables of different treatment groups, I have used twang::mnps function to perform inverse probability weighting and successfully got the ...
• 11
1 vote
25 views

### How are centers in an RBF Network chosen?

I am struggling to understand how RBF (radial basis functions) work. My first question concerns the weights: are the learnable weights the same as the centres? So, is the algorithm essentially ...
• 63
21 views

### How do I check if the weights of my perceptron/step activation function are correct

I am new to stack overflow and deep learning so I hope I am doing this the right way. I tried to find the solution myself but it has not been successful so I am seeking some help. This is the ...
• 23
1 vote
51 views

### Initialize weights with the same value

I know that there are a lot of topics about it but I still don't understand something. People say that if we initialize weights of a neural network with the same value there is no learning because the ...
21 views

### How can I calculate weights when I know the values of the dependent variable?

I have a dataset that combined survey and administrative data. Thus, I know the values of the dependent variable, because it stems from an administrative source, but I have missing data in my survey ...
• 111
31 views

### How to get weighted mean with two weighting sources

I have some data on a cyclists distance traveled and hours it took. ...
• 23
4k views

### Calculate probability of dying in school shooting using spatial statistics

Some public commentators say that the chance of dying in a school shooting is very low, so they conclude that Americans over-react to them. https://www.washingtonpost.com/outlook/school-shootings-are-...
1 vote
21 views

### Assigning weights to independent variables for a composite metric

I am trying to evaluate merchant experience for a company. I have a set of metrics like success rate, service tickets, ticket sla breaches etc as independent variables. Merchant experience would be my ...
29 views

### Rate vs. Count Outcome with Case Weights in Random Forest

I am doing a geographic analysis to predict rate of disease in each geographic unit based on various aggregate geographic/demographic features, without any individual-level data. Each geographic unit ...
66 views

### creating index using pca

i want to create an index. it has 3 subindices A,B,C. each subindex further consists of 3 different variables A1,A2,A3,B1,B2,B3 and so on. in total there are 9 variables. i want to assign weights ...
34 views

### Question about understanding Weights of Keras LSTM model

I am implementing Federated Learning (FL) using Keras LSTM. Starting with the simple example where multiple models are trained at different clients. Each client shares their model weights with the ...
• 444
25 views

### Smoothing time series with Adjusted R2-weighted averages

I have two parameters (a,b) resulting from an exponential estimation of a curve. I have estimated this curve every hour for one month. In other words, I have a total of 720 parameters a and b, and I ...
1 vote
24 views

### How to constrain ordinary kriging weights to sum to 1 in R

I need to perform ordinary kriging on a dataset and I understand that I need the weights to sum to 1, I just don't understand how to set that up properly. For example, my covariance function is C(h) =...
• 11
9 views

### Sample weighting for conditionally imbalanced classes in longitudinal cohort study

I’m conducting an analysis on a longitudinal cohort study that selected subjects with and without cognitive impairment. Subjects were recruited to maximize balance in the case and control group in ...
1 vote
20 views

### Differentiating output of layer with respect to its input [duplicate]

Say we have a relationship $z = Wx$ for a multi layer perceptron where $z$ and $x$ are $n$ dimensional vectors. When we find $\frac{dz}{dx}$ , I would assume this would just be $W$, not $W^T$. I was ...
• 11
22 views

### If the weight and bias gradients are stuck at zero throughout training, is this an indication of dying ReLu?

A high learning rate when combined with a ReLu activation function is known to lead to the 'dying ReLu' problem. Is this a reasonable conclusion to arrive at if the gradient with respect to weights ...
45 views

### Offset or weight in binomial GLM - account for distance to road on animal sightings

I am building a species distribution model for an animal, using data collected by community members when they sight this animal. My first step is to fit a generalised linear model with family binomial ...
43 views

### distribution of normalized random weights

TL;DR: Given a finite series of positive and iid random variates/weights $w_i$ of known distribution, $(w_1, ... w_n)$, what is the distribution (or at least the exp.val. and variance) of the ...
22 views

### Weighted estimation

The following equation was derived from an optimization problem. I have data on the parameters $b, v, n$ and $r$ and I would like to estimate the parameter $a$ that fits the data most closely. I ...
• 21
44 views

### How to bias-correct proportions for a prop.test in R?

Let's say I ask 200 participants in a study what experience brought the most joy to their lives: A, B, C, or D. ...
81 views

### Weighted sum of Bernoulli distributions

Suppose $$X_i \sim \text{Bernoulli }(p)$$ What can be said about the distribution of $Y$, given by $$Y = \sum_{i=1}^N w_i X_i$$ for non-negative weights $w_i$? Note that $N$ here is small, so ...
• 101
49 views

### Independent samples z-score calculation with weighted samples

Here is some pseudo code showing how one can calculate the z-score for comparing two proportions/percentages: ...
• 101
34 views

### How to assign weights to a set of ordered objects?

I have been trying to assign weights to set of objects. The problem that I have is as following. I have a set of objects ordered either ascending or decending. . Each object shall be provided a weight ...
• 103
16 views

### Optimizing weights of elements based on their correlation to the same metric

I'm in my freshman year in college and working on a data science project the goal of which is to measure a country's prosperity. We've grouped similar indicators or elements into one pillar. We have 5 ...
373 views

### Trainable weights in attention mechanism

I am wondering what are the trainable weights inside an attention-powered transformer. I figure the feed-forward layer contain trainable weights and the token embeddings, but what other parts contain ...
46 views

### How do I calculate a finite-population correction for a weighted sample?

I have a weighted sample from a population. These are probability weights (as samples are taken with unequal probability). What's the variance in the estimated total? All samples are exchangeable (...
25 views

### Determine feature importance of nested regression model

For remote sensing purposes, I'm trying to combine data from two different satellites. To do so, one of the two has a much higher weight than the other, but this is area specific. My goal is to use a ...
40 views

### Accounting for sampling effort of independent variables in a regression analysis

I would like the test whether the frequency of a cellular structure on a histology section is associated with (binary) patient outcomes. This would be a simple logistic regression of i.e. ...
• 1,110
40 views

### Can I randomly eliminate survey respondents belonging to a severely over-represented group in order to allow for better weighting of data?

I have a population made of the following segments: A: 19% B: 52% C: 2% D: 10% E: 17% F: 0.5% My final sample (n=1,272), due to a much higher response rate for group C, is A: 27% B: 15% C: 38% D: 9% E:...
17 views

### Multilevel modelling weight

I want to use a nation-wide dataset which is associated with individual level weight to show the population in the US that is represented by the sample, and county-level sociodemographic census ...
• 1
1 vote
104 views

### How to account for weights of a skewed dataset in a machine learning problem?

I, a novice, have a dataset which I would like to use for multiclass classification. I know that the data is skewed, but luckily, my dataset contains an observation weights column. The observation ...
100 views

### Weights for estimating ATE (rather than ATT) in SAS %CEM macro for coarsened exact matching?

I'm running Gary King's %CEM SAS macro (available here) for coarsened exact matching (CEM) for a project at work. The macro works fine for estimating the Average Treatment Effect on the Treated (ATT) ...
• 4,696
95 views

### Warning about factor score estimation method when using omega() from psych

I am a beginner in statistics with R. I am currently analyzing the results of a questionnaire in my PhD research. I am trying to measure reliability using McDonald's omega rather than Cronbach's alpha....
24 views

### Weighting data and causal modelling

When using causal models such as difference-in-difference or propensity score matching, will weighting the data to represent the population effect the outcome (i.e., will it bias my results)?
I'm working on a Regression problem consisting on predict some continuous variable $Y$, as usual. The thing here is that there are two kinds of data examples: some that have a value of $Y$ a little ...