Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "batch" number as additional variable in regression #2

Open
trangdata opened this issue Feb 11, 2019 · 1 comment
Open

Add "batch" number as additional variable in regression #2

trangdata opened this issue Feb 11, 2019 · 1 comment

Comments

@trangdata
Copy link
Contributor

We discussed adding a "batch" variable in the individual regression to alleviate some violation of the independence assumption (hence the term pseudo). For example, a diff between sample 3 and 2 would have 3 as the batch number (rule of thumb: take the first sample id).

I thought about considering this variable as a random effect term, but the independence assumption there is not quite what we want. For instance, within the neighborhood of 3, these differences (e.g. 3-2, 3-5, 3-6) are independent. However, they may not be independent of other differences in a different neighborhood (e.g. 2-5). In short, we have within-neighborhood independence but not between-neighborhood (which a mixed model would correct for).

Maybe we should stick with the fixed model and adding the batch variable as a fixed effect term.

@brett-mckinney
Copy link
Member

I will plan on adding a boolean flag to the main function, maybe called dependent.neighbors.adjust. When True, it will create the covariate dependent.neighbors.covar and add it to the model to adjust for dependency. I have an idea to run by you for dependent.neighbors.covar to capture the redundancy. It will be a lot of states for a factor variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@brett-mckinney @trangdata and others