-
Notifications
You must be signed in to change notification settings - Fork 0
/
ignore-structure.Rmd
23 lines (14 loc) · 1.42 KB
/
ignore-structure.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Ignore Data Dependency
The first thing we can do is ignore the situation and just run a standard regression. This is actually okay if you have very few clusters, and put the cluster id in the model as a fixed effect. Otherwise, this is not acceptable with regard to the standard errors (SE), as cluster level covariates will be treated as if there are N*timepoint observations (typically underestimating the SE as a result), while the standard error for the time-varying covariates will not account for the clustering (typically overestimating).
```{r SLiM, echo=1}
lm_mod = lm(y ~ time + treatment, data=d, x=T)
pander(summary(lm_mod), round=2, format=list(nsmall=2, digits=2))
```
First be aware that the 'treatmenttreatment' label just tells us that the coefficient refers to moving from the reference group (i.e. 'control') to the treatment group, i.e. considers treatment a binary variable where 1 equals treatment and 0 control. Note that the coefficients are in the ballpark of where the true values are, save for the estimate of the residual variance, which packs in all sources of variance into one estimate. As mentioned though, the standard errors for the effects would be problematic.
## Pros
- Easy
- Provides estimation of the effects most are primarily interested in
## Cons
- Standard errors are off
- Ignores the cluster-specific effects, which may be highly interesting
Gist: Probably not viable for most situations.