Dear limma team,
First of all, I want to thank you for this wonderful package. This said, I need to ask you a question on the subject mentioned in this post, Standard error calculation from my fit object using the command in the post:
>std.error = fit$stdev.unscaled * fit$sigma
> std.error
numeric(0)
> fit$stdev.unscaled
NULL
> fit$sigma
NULL
I'd ask if some experienced limma user may help me figuring out what the problem is.
Here is the structure of my fit object:
> str(fit)
List of 1
$ :Formal class 'MArrayLM' [package "limma"] with 1 slot
.. ..@ .Data:List of 12
.. .. ..$ : num [1:19568, 1:2] 7.93 9.38 7.46 7.81 10.88 ...
.. .. .. ..- attr(*, "dimnames")=List of 2
.. .. .. .. ..$ : chr [1:19568] "ILMN_2417611" "ILMN_2896528" "ILMN_2721178" "ILMN_3033922" ...
.. .. .. .. ..$ : chr [1:2] "g1" "g2"
.. .. ..$ : int 2
.. .. ..$ : NULL
.. .. ..$ :List of 5
.. .. .. ..$ qr : num [1:24, 1:2] -3.464 0.289 0.289 0.289 0.289 ...
.. .. .. .. ..- attr(*, "dimnames")=List of 2
.. .. .. .. .. ..$ : NULL
.. .. .. .. .. ..$ : chr [1:2] "g1" "g2"
.. .. .. ..$ qraux: num [1:2] 1.29 1
.. .. .. ..$ pivot: int [1:2] 1 2
.. .. .. ..$ tol : num 1e-07
.. .. .. ..$ rank : int 2
.. .. .. ..- attr(*, "class")= chr "qr"
.. .. ..$ : int [1:19568] 22 22 22 22 22 22 22 22 22 22 ...
.. .. ..$ : Named num [1:19568] 0.213 0.156 0.16 0.26 0.135 ...
.. .. .. ..- attr(*, "names")= chr [1:19568] "ILMN_2417611" "ILMN_2896528" "ILMN_2721178" "ILMN_3033922" ...
.. .. ..$ : num [1:2, 1:2] 0.0833 0 0 0.0833
.. .. .. ..- attr(*, "dimnames")=List of 2
.. .. .. .. ..$ : chr [1:2] "g1" "g2"
.. .. .. .. ..$ : chr [1:2] "g1" "g2"
.. .. ..$ : num [1:19568, 1:2] 0.289 0.289 0.289 0.289 0.289 ...
.. .. .. ..- attr(*, "dimnames")=List of 2
.. .. .. .. ..$ : chr [1:19568] "ILMN_2417611" "ILMN_2896528" "ILMN_2721178" "ILMN_3033922" ...
.. .. .. .. ..$ : chr [1:2] "g1" "g2"
.. .. ..$ : int [1:2] 1 2
.. .. ..$ : Named num [1:19568] 7.85 9.39 7.46 7.89 10.86 ...
.. .. .. ..- attr(*, "names")= chr [1:19568] "ILMN_2417611" "ILMN_2896528" "ILMN_2721178" "ILMN_3033922" ...
.. .. ..$ : chr "ls"
.. .. ..$ : num [1:24, 1:2] 1 1 1 1 1 1 1 1 1 1 ...
.. .. .. ..- attr(*, "dimnames")=List of 2
.. .. .. .. ..$ : NULL
.. .. .. .. ..$ : chr [1:2] "g1" "g2"
Please accept my apologies if this can be considered a very naive question...
Best wishes
JL
Yes, I was referring to the standard error (this has been fixed above). This would seem to be the more relevant metric - my rule of thumb is that standard errors refer to the variability of your coefficient estimates, while standard deviations refer to the variability of your observations. I'm not sure whether the concept of the standard deviation of an estimate makes any sense. The variability of the coefficient estimate will naturally drop as you get more information (i.e., larger N, hence smaller SE) to obtain that estimate, while the variability of the observations won't change regardless of how many observations you collect.
For your second point, you need to make sure that the coefficients in your design matrix represent the average expression in each condition. If so, then the computed standard errors will represent those of average expression estimates. Either way, the shrunken variances are agnostic to the parameterisation of the design matrix so it shouldn't matter in that respect.