0
$\begingroup$

Shown below is a snippet of a simplified version of my dataset. My question pertains to possible ways to structure a dataset to capture variation around a single value that is otherwise not recognized. The analysis I am running is a binomial GLM for proportions. I am using R. Here is the current structure of my dataset:

enter image description here

I have response variable Response with various Predictors. Response is a proportion, while Predictor 1 is the median of 4 measurements taken from 4 individual measurements. Predictors 2-4 are irrelevant here. Here is the problem: I can run the analysis, but I've been bothered by the fact that I'm not at all accounting for the 4 values that go into my median. Therefore, I have been thinking about possible ways to get around having to reduce 4 valuable measurements into a median. Here are the thoughts I’ve had so far:

  1. See below: structuring the data like this is not possible because this would result in pseudoreplication. However, would it be possible to structure the data like this and somehow “tell” R to account for this?

enter image description here

  1. Could it be possible to keep the dataset structured the way I have it originally and add some metric of spread or variation around the median value, and somehow give R this information to work with, instead of just using a static value?

I'm hoping that someone can give me some suggestions for things to look into. All the searches I've tried haven't given me much luck, so even some keywords to add to those would be helpful. Thanks!

$\endgroup$
1
  • $\begingroup$ Whether you need to account for the construction of Predictor 1 depends on how you intend to interpret and apply your model. Please explain that context. $\endgroup$
    – whuber
    Sep 14 at 15:27