- Coding
- Start-up culture
2016年5月16日 星期一
2016年5月10日 星期二
5.10 Wrote to myself
(May 2nd, 2016 posted on Facebook)
Thanks for everyone’s birthday wishes!
Today turns out to be a day of hardworking. Although still got a lot to work on, I am glad to see my first scientific manuscript getting better every single day.
After work, with a little spirit of celebration, I got myself a new pair of StanSmith, a cup of S’more Frapuccino, and a wonderful dinner in SOMA at the Kimchi Burrito place watching Spur’s game.
Thanks for everyone’s birthday wishes!
Today turns out to be a day of hardworking. Although still got a lot to work on, I am glad to see my first scientific manuscript getting better every single day.
After work, with a little spirit of celebration, I got myself a new pair of StanSmith, a cup of S’more Frapuccino, and a wonderful dinner in SOMA at the Kimchi Burrito place watching Spur’s game.
I want to remind myself that in 2015, I wrote down several TODOs:
- Learn R programming
I am so glad that I’ve been picking up the programming skill, which helped me accomplished my master thesis and now become my primary tool for daily work. Every day I learn a bit of it and immediately apply in problem solving, which gives me a full sense of accomplishment.
- Keep traveling
I spent a wonderful year traveling around US and China, as well as Okinawa for PhD interview. It can’t be more enjoyable to get reunion with old friends, families, as well as meeting new friends. Will certainly keep the spirit on!
- Keep reading
I am not reading quite much. Tons of daily fragment readings wouldn’t count. Two of my current interests are “How to be a Modern Scientist” by Jeff Leek and “The Art of Data Science” by Roger Peng, both authors are the instructors of John Hopkins University’s Data Sciences Specialisation on Coursera. Will try reading things that are seemingly irrelevant but genuinely inspiring.
- Keep being grateful for life
Living in a different culture and country is certainly not easy. Though did experienced down moments and hard time, I always had supports in all kinds of ways which helped me got through. Life is certainly wonderful in both explainable truths and unexplainable beauties.
- Make more jokes about life
Have I? I will keep making more!
- Try not to get horned by SF driver
I've become one of them?!
At the age of 26, I want to:
- Get my first vehicle and get the kick on Route 66
- Keep the positive attitude
- Learn machine learning with python
- Not discouraged by the on-going challenges
- Try my best to be an excellent PhD student
#StillOnMyWay
- Learn R programming
I am so glad that I’ve been picking up the programming skill, which helped me accomplished my master thesis and now become my primary tool for daily work. Every day I learn a bit of it and immediately apply in problem solving, which gives me a full sense of accomplishment.
- Keep traveling
I spent a wonderful year traveling around US and China, as well as Okinawa for PhD interview. It can’t be more enjoyable to get reunion with old friends, families, as well as meeting new friends. Will certainly keep the spirit on!
- Keep reading
I am not reading quite much. Tons of daily fragment readings wouldn’t count. Two of my current interests are “How to be a Modern Scientist” by Jeff Leek and “The Art of Data Science” by Roger Peng, both authors are the instructors of John Hopkins University’s Data Sciences Specialisation on Coursera. Will try reading things that are seemingly irrelevant but genuinely inspiring.
- Keep being grateful for life
Living in a different culture and country is certainly not easy. Though did experienced down moments and hard time, I always had supports in all kinds of ways which helped me got through. Life is certainly wonderful in both explainable truths and unexplainable beauties.
- Make more jokes about life
Have I? I will keep making more!
- Try not to get horned by SF driver
I've become one of them?!
At the age of 26, I want to:
- Get my first vehicle and get the kick on Route 66
- Keep the positive attitude
- Learn machine learning with python
- Not discouraged by the on-going challenges
- Try my best to be an excellent PhD student
#StillOnMyWay
2016年5月6日 星期五
5.6 Stats Question in R
Remind myself of these conversations of learning statistics through using R these days.
Thanks Tim, your comments are very helpful.
1) The reason I excluded the intercept (i.e., -1) is only for the convenience of extracting the coefficients (i.e. return the intercept, which refers to the Estimate column, respectively for each group). I indeed included the intercept (i.e., no -1) when running the actual analyses. The difference of taking in/out of the intercept is just the table outputs, not affecting any result of the analyses.
2) Dieter - Tim was correct. These two commands in fact did the same thing in R, meaning main effects are given by both commands in addition to the interaction term.
>lm(FA_308_27 ~ gp*smoker + Age - 1, data = dat3.2)
Estimate Std. Error t value Pr(>|t|)
gp1mALC 0.610268207 0.0425865499 14.330069 4.398040e-22
gp1wkALC 0.603016628 0.0469235498 12.851045 9.528076e-20
smokers 0.028498249 0.0194763982 1.463220 1.480830e-01
Age -0.001429693 0.0007651574 -1.868495 6.606585e-02
gp1wkALC:smokers -0.040359689 0.0368267023 -1.095935 2.770308e-01
>lm(FA_308_27 ~ gp + smoker + gp*smoker + Age - 1, data = dat3.2)
Estimate Std. Error t value Pr(>|t|)
gp1mALC 0.610268207 0.0425865499 14.330069 4.398040e-22
gp1wkALC 0.603016628 0.0469235498 12.851045 9.528076e-20
smokers 0.028498249 0.0194763982 1.463220 1.480830e-01
Age -0.001429693 0.0007651574 -1.868495 6.606585e-02
gp1wkALC:smokers -0.040359689 0.0368267023 -1.095935 2.770308e-01
3) I have read in pairwise comparisons in R (http://www.r-bloggers.com/r-tutorial-series-two-way-anova-with-pairwise-comparisons/) and Two-way ANOVA with Interactions and Simple Main Effects (http://rtutorialseries.blogspot.com/2011/02/r-tutorial-series-two-way-anova-with.html). I will change my statistical procedure accordingly.
Sincerely,
Yukai
===
Hi Yukai,
1) I'm wondering why you do not include the intercept in the model. In your equation, you have -1. I strongly suggest you include the intercept (i.e., +1). Depending on the statistical procedure you run, it can make a huge difference. I don't remember if matters in the standard lm model, but I always include it for form.
2) It is fine to do gp*smoking. In lm, if you use * e.g., variable1*variable2, the main effects for each variable in the interaction term will automatically be included.
3) The reason you do not see means for the 4 groups (ns1mALC, s1mALC, ns1wkALC, and s1wkALC), is because the model you built only includes the main effects and interactions. To get the adjusted means and standard errors for each individual group, you need to do pairwise comparisons among those groups. Just google pairwise comparisons in R, pairwise t-tests in R or try http://www.r-statistics.com/. There should be some sample code that you can adapt, and it is relatively straight-forward to execute.
Tim
Thanks Tim, your comments are very helpful.
1) The reason I excluded the intercept (i.e., -1) is only for the convenience of extracting the coefficients (i.e. return the intercept, which refers to the Estimate column, respectively for each group). I indeed included the intercept (i.e., no -1) when running the actual analyses. The difference of taking in/out of the intercept is just the table outputs, not affecting any result of the analyses.
2) Dieter - Tim was correct. These two commands in fact did the same thing in R, meaning main effects are given by both commands in addition to the interaction term.
>lm(FA_308_27 ~ gp*smoker + Age - 1, data = dat3.2)
Estimate Std. Error t value Pr(>|t|)
gp1mALC 0.610268207 0.0425865499 14.330069 4.398040e-22
gp1wkALC 0.603016628 0.0469235498 12.851045 9.528076e-20
smokers 0.028498249 0.0194763982 1.463220 1.480830e-01
Age -0.001429693 0.0007651574 -1.868495 6.606585e-02
gp1wkALC:smokers -0.040359689 0.0368267023 -1.095935 2.770308e-01
>lm(FA_308_27 ~ gp + smoker + gp*smoker + Age - 1, data = dat3.2)
Estimate Std. Error t value Pr(>|t|)
gp1mALC 0.610268207 0.0425865499 14.330069 4.398040e-22
gp1wkALC 0.603016628 0.0469235498 12.851045 9.528076e-20
smokers 0.028498249 0.0194763982 1.463220 1.480830e-01
Age -0.001429693 0.0007651574 -1.868495 6.606585e-02
gp1wkALC:smokers -0.040359689 0.0368267023 -1.095935 2.770308e-01
3) I have read in pairwise comparisons in R (http://www.r-bloggers.com/r-tutorial-series-two-way-anova-with-pairwise-comparisons/) and Two-way ANOVA with Interactions and Simple Main Effects (http://rtutorialseries.blogspot.com/2011/02/r-tutorial-series-two-way-anova-with.html). I will change my statistical procedure accordingly.
Sincerely,
Yukai
===
Hi Yukai,
1) I'm wondering why you do not include the intercept in the model. In your equation, you have -1. I strongly suggest you include the intercept (i.e., +1). Depending on the statistical procedure you run, it can make a huge difference. I don't remember if matters in the standard lm model, but I always include it for form.
2) It is fine to do gp*smoking. In lm, if you use * e.g., variable1*variable2, the main effects for each variable in the interaction term will automatically be included.
3) The reason you do not see means for the 4 groups (ns1mALC, s1mALC, ns1wkALC, and s1wkALC), is because the model you built only includes the main effects and interactions. To get the adjusted means and standard errors for each individual group, you need to do pairwise comparisons among those groups. Just google pairwise comparisons in R, pairwise t-tests in R or try http://www.r-statistics.com/. There should be some sample code that you can adapt, and it is relatively straight-forward to execute.
Tim
訂閱:
文章 (Atom)