627 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
26
views
What is the weights argument in glmer() of lme4 doing when using gamma response?
I am using a gamma response in glmer() from lme4. Some rows in my data set represents averages from n_i observations, while most observations just are individual measurements. My idea was to ...
Advice
0
votes
2
replies
52
views
What are 'weights' argument in lme4 glmer() with gamma response doing?
I am using a gamma response in glmer() from lme4. Some rows in my data set represents averages from n_i observations, while most observations just are individual measurements. My idea was to ...
0
votes
0
answers
43
views
R: meta::metacont() is ignoring weights
I am using metacont() (from meta package) to perform a meta-analysis of some studies, but when I try to specify weights the function ignores them. Here below a reproducible example:
label <- c(
&...
0
votes
0
answers
102
views
Calculating confidence interval for a weighted mean
I am trying to calculate the confidence interval for a weighted mean in R.
Here is some example data:
t <- tibble(value = c(3, 6, 2, 8, 4), weights = c(0.9, 0.8, 1, 1.2, 1.1))
t
# A tibble: 5 ×ばつ 2
...
0
votes
0
answers
34
views
How to deal with the 'weigted avg' with weight might be 0?
How to implement the following complex logic using SQL:
Assume my original table contains two fields, id and x, where id is an incrementing sequence and x is a sequence of floating-point numbers:
id
x
...
1
vote
1
answer
103
views
AME with Survey weights
I'm trying to calculate average marginal effects (AMEs) from a logistic regression model estimated with svyglm from the survey package.
I am using the design from a specialised package developed to ...
1
vote
1
answer
91
views
How to get weighted bootstrapped estimates and CIs from a phyloglm function of the phylolm package
I constructed a phylogenetic logistic regression model for a binary response variable using the phyloglm() function from the phylolm package.
The code looks like below (predictor and response names ...
0
votes
0
answers
55
views
Any known changes to glmmTMB since 2023 that would alter model fit?
I used glmmTMB to run GLMMs with a beta distribution to evaluate the proportion of time an animal spends doing a behavior. My observations were of different lengths, and I weighted the observations ...
0
votes
1
answer
40
views
Missing Person Replicate Weight Variable Error in tidycensus
I'm analyzing the demographic characteristics of nurse practitioners in the US using the 2023 ACS survey and tidycensus.
I've downloaded the data using this code:
pums_2023 = get_pums(
variables = c(...
1
vote
1
answer
126
views
Differences in R and Stata in logistic regressions [closed]
So I'm replicating a paper, most probably done on Stata judging by the appearance of the graphs. However I'm using R, and while the numbers are exactly the same when it comes to variable construction, ...
0
votes
1
answer
67
views
Issues with weighting in principal of psych
I am trying to replicate a principal component analysis in R based on one I have performed in SPSS. I am using the psych package and the principal function, but I cannot get it to account for the ...
0
votes
1
answer
73
views
Unable to get the raw decimal of my weights, auto rounding somewhere?
I'm doing a single layer perceptron where I need to get my model to predict whether the user makes a T or an L using some buttons on a website. rn i'm trying to get the weights and bias so I can ...
0
votes
1
answer
96
views
R: Error in x[[jj]][iseq] <- vjj : replacement has lenght zero (Library SpatialML::rgf)
I am trying to run a geographically weighted random forest classification using the function SpatialML::rgf(). However, I am encountering the following error:
'Error in x[[jj]][iseq] <- vjj : ...
2
votes
0
answers
70
views
How to supply sample weights to Tensorflow dataset in R
I am trying to set up a dataset in R to run a neural network using TensorFlow, but I can't seem to figure out the right code to allow sample weights to be specified.
The input array is image_data and ...
1
vote
0
answers
112
views
What is a good approach to calculate the median of weighted data using SQL?
TL;DR: I've got a column for test metric, for control metric, and for test-control weight. I can use the weight to calculate a weighted average. How should I approach median metrics in a SQL ...