Split plot analysis, LSD test and plotting bar graphs using R

Поделиться
HTML-код
  • Опубликовано: 8 окт 2024
  • In this video, you will learn how to carry out analysis for split-plot design with least significant difference test and plotting bar graphs with standard error bars using R studio.
    Video contains:
    0:24 - Import data set
    1:21 - Converting categorical variables to factor variables
    1:51 - Split plot analysis
    2:27 - Mean separation test (LSD test)
    4:02 - Plotting bar graphs
    5:02 - Interaction plot with factor categories
    package required: agricolae
    =============
    Download Links
    =============
    Updated blog:
    Download R-script & data file ⁠- visit this blog:
    www.agroninfo....
    Old blog:
    Download R-script & data file ⁠- visit this blog:
    agroninfotech....
    R is free software and you can download it from the link given below
    www.r-project....
    Download link for R studio
    www.rstudio.co...
    ___________________________________________
    ====================
    Get connected with us on
    ====================
    Website: www.agroninfo....
    Facebook page: www.facebook.c...
    Twitter: / agroninfotech
    Linked In: / agron-info-tech-7429a6156
    ____________________________________________
    If you have any question please comment below.
    Thanks for watching this video.
    #R #SplitPlot #LSD #LSDTest #SplitPlotAnalysis #BarGraphs #SE #standardError

Комментарии • 104

  • @Filipao13
    @Filipao13 4 года назад +1

    Thank you so much for the video, easy to follow, 100% recommended.

  • @chinnidevadas6357
    @chinnidevadas6357 4 года назад +2

    First of all let me began by thanking you for giving such a wonderful presentation on SPD in r and sir I need some clarity that while comparing interaction treatments means in SPD, usually we will look in two directions know sir, i.e., (1) two sub-plot treatment means at a given main-plot treatment and (2) two main plot treatment means at same or different sub-plot treatment, do we get in that way of interaction comparisons in this package?. Please do respond sir.

    • @AGRONInfoTech
      @AGRONInfoTech  4 года назад

      Thank you for your compliment. The above two points which you have mentioned specify the main effects for both factors whatever I perceived from your statement. Interaction effect in split plot specify mean values for both main plot and sub plot factor however the difference from factorial experiment is that the factor with less importance is kept in main plot with containing larger experimental error.

    • @chinnidevadas6357
      @chinnidevadas6357 4 года назад

      @@AGRONInfoTech Thanks for the information sir

    • @AGRONInfoTech
      @AGRONInfoTech  4 года назад

      You are most welcome

    • @bc.cc.la.5194
      @bc.cc.la.5194 3 года назад

      @@AGRONInfoTech
      I agree with Mr. devadas.
      there are two different LSD value to calculate while we are comparing interaction treatments means in SPD,
      (1) comparision. To compare two subplot treatment means for the same whole plot treatment. (e.g. super:4w v.s. super:3w).
      (2) comparision. To compare two whole plot means at the same or different sub plot treatments (e.g. shaheen:4w v.s. super:2w) or (e.g. shaheen:2w v.s. super:2w).
      please check the webiste for more detail LSD calculation of SPD: www.ndsu.edu/faculty/horsley/splplot.pdf
      As your R code in the video, it seems that the result of "out3" conformed to the (1) comparision. that means, the value of LSD (out3)=4.132411 Only can used in comparing subfactor"age" for the same mainfactor "var". It's Not suitable for all means of comparision. We need to calculate another LSD value for the (2) comparision.
      My question is, how to calculate the LSD value for the (2) situation??

  • @陈皮-b2q
    @陈皮-b2q 6 лет назад +2

    thanks for the video...
    i just would like to know that what is the meaning of GLA and GLA, EA and Eb, and what is the function?

  • @martinabautista
    @martinabautista 8 месяцев назад

    Very understable. I have a split-split plot design. Could I apply the same test as you did in the video?

    • @AGRONInfoTech
      @AGRONInfoTech  8 месяцев назад +1

      Use the following code for ANOVA:
      ssp.plot(block, pplot, splot, ssplot, Y)
      Arguments
      block: replications
      pplot: Factor main plot
      splot: Factor subplot
      ssplot: Factor sub-subplot
      Y: Variable, response

    • @martinabautista
      @martinabautista 8 месяцев назад

      @@AGRONInfoTech thank you so much. You're help is invaluable. I'm facing two other problems with my data. First I take mesuarements in 3 different times, so I have the following factors: factor light (4), factor variety (4), factor NaCl treatment (2), replications (4), and with time I have another factor, right?. So I have 4x4x2x4x3 which lead me with 384 observations 😮‍💨. I was thinking in analyzing each time separately to see what is the factor that influences the most, then eliminate that factor and evaluate within my 3 different times. What do you think of this approach? Also, I'm worried because I might and unbalanced design since some plants in my experiment die earlier. How does that influences in the analysis? (Sorry to bother you with all theses questions)

  • @muhammaduzair3659
    @muhammaduzair3659 5 лет назад +2

    Thanks a lot.
    This video was of great help.

  • @wendesenmelak
    @wendesenmelak 6 лет назад +1

    Thank you very much and it was great Experience, and I would like to know which CV value to use in split plot, the main plot factor, the sub plot factor or the interaction?, because it lists like CVa,and CVb ,I would like to thank you and wish to follow your other posts.

    • @AGRONInfoTech
      @AGRONInfoTech  6 лет назад

      There are actually two CVs, one for the sub plot CV (b) and one for whole plots CV (a). Presentation of the former is usually sufficient. However you can also use the whole plot CV. CV for whole plots is usually lower than CV for sub plot because larger plot tend to have lower CV. Sub plot CV also reflects variation for interaction term.

  • @mamybinzunga4456
    @mamybinzunga4456 Год назад

    hello. Thanks. Is there from you, a video for a 3 ways- anova using r? Please.

  • @shopstream92
    @shopstream92 4 года назад +1

    Thanks alot
    Please guide me how to do augmented split plot design analysis.

    • @AGRONInfoTech
      @AGRONInfoTech  4 года назад

      I have to work on augmented factorial and split anlysis. I shall keep augmented split plot analysis in loop. Shall upload video on this aspect later on. Thanks for the suggestion.

  • @_patience1001
    @_patience1001 Год назад +1

    Thank you very much!

  • @indonesiangirl99
    @indonesiangirl99 3 года назад

    OMG! thank you so much! its works perfectly and I understand clearly on this method!
    i have a question, what is the code for add the average number of each bar? I want to put each X bar of average on top of each error line.. thank you

    • @AGRONInfoTech
      @AGRONInfoTech  3 года назад

      Thanks. You can use text(data, model$average, cex=1) to add average values above the bars.
      Here model may be the output of aov() function and after dollar sign type the component representing average values.

  • @Mohamed-fr6jn
    @Mohamed-fr6jn 3 года назад

    Thanks for your video
    to perform this analysis, do we need to chech the normallity of the distribution and the homogeneity of variance

    • @AGRONInfoTech
      @AGRONInfoTech  3 года назад +1

      You can check the normality of the data before proceeding for this analysis. However for homogeneity of variances it depends what type of data you are working on. For example if you have a dataset that was repeated over years, location, sites or harvests then you need to first look at the homogeneity of variances across the repeating factor. I hope this make sense.

    • @Mohamed-fr6jn
      @Mohamed-fr6jn 3 года назад +1

      @@AGRONInfoTech Thanks

    • @AGRONInfoTech
      @AGRONInfoTech  3 года назад

      You are most welcome

  • @ranadawood2464
    @ranadawood2464 2 года назад

    thank you for this session. can i add error bar in interaction bar graph? please reply

    • @AGRONInfoTech
      @AGRONInfoTech  2 года назад

      Go through the video on plotting bar graphs with SE. The link is given below:
      ruclips.net/video/onDRLhJ_toI/видео.html

  • @mohanbista3235
    @mohanbista3235 5 лет назад +1

    thanks for amazing video. can you provide the commands that u have used in video?

    • @AGRONInfoTech
      @AGRONInfoTech  5 лет назад

      Thanks. You can get the commands from the following link of blog...
      agroninfotech.blogspot.com/2018/06/split-plot-analysis-using-r.html

  • @blueb7995
    @blueb7995 5 лет назад

    Very good demonstration. For the interaction plot, how do i sort them? For example, I want them in the order of Shaheen:2W, Super:2W, Shaheen:3W, Super:3W, Shaheen:4W, Super:4W.

    • @AGRONInfoTech
      @AGRONInfoTech  5 лет назад

      Just reverse interaction term at 5:15 to var:age instead of age:var. Also use this interaction term ahead if needed.

  • @truongphu7407
    @truongphu7407 2 года назад

    Thanks for your helpful tutorial. Could you tell how to run LSD test for multi-variables data set? If I run LSD test one by one, tit will takes long time due to there are only four groups but 15 variables.

    • @AGRONInfoTech
      @AGRONInfoTech  2 года назад +1

      I am just making another video on it where you will get publication ready style mean comparison test for the given data set within few simple steps.

    • @truongphu7407
      @truongphu7407 2 года назад

      @@AGRONInfoTech Thank you so much. I am looking for it soon

    • @AGRONInfoTech
      @AGRONInfoTech  2 года назад

      Thanks for your support

  • @JONARDGCANAS
    @JONARDGCANAS 6 лет назад

    thanks for the video...
    i just would like to know what software is used in analysing.???

    • @AGRONInfoTech
      @AGRONInfoTech  6 лет назад

      R software is used. Its free software and can be downloaded from the link given in description of this video.

  • @vijendra22kar
    @vijendra22kar 4 года назад

    Thank you for nice presentation to learn the SPD analysis. Can you please share the R Codes for this analysis. Please let me know the R and R Studio difference. Can we done the Split Plot Design Analysis in both of this. Thanks.

    • @AGRONInfoTech
      @AGRONInfoTech  4 года назад +1

      Dear Dr. Baviskar the link for R script or commands to perform split plot analysis is added in description of this video. Please download it.
      However for the difference in R and R studio, I shall simply say as the difference between window 98 and XP. You need to install R and then R studio.

    • @vijendra22kar
      @vijendra22kar 4 года назад +1

      @@AGRONInfoTech Thank you for the information. Will be performing analysis with these codes, hope it will work on my desktop.

    • @AGRONInfoTech
      @AGRONInfoTech  4 года назад

      I hope this will work. If you get some error then let me know

  • @dembadiakhate9329
    @dembadiakhate9329 Год назад

    dear professor can you use the methode for split plot for putting the letter a, b, c

    • @AGRONInfoTech
      @AGRONInfoTech  Год назад

      Thank you. I shall create video on it later on however, if you need it urgently then you can send me data and the Rscript you have at the below email address. I shall amend it and will share it with you.
      agron.infotech@gmail.com

  • @razaullah8194
    @razaullah8194 4 года назад +1

    great work

  • @jernealalfonso6425
    @jernealalfonso6425 5 лет назад

    Thank you sir, Can you also upload videos on how to analyze factorial rcbd design.
    Thank you

    • @AGRONInfoTech
      @AGRONInfoTech  5 лет назад

      Thanks for your feed back. I shall also include 3 and 4 factor factorial analysis soon. However you can go through 2 factor factorial analysis under rcbd and crd in videos.
      ruclips.net/video/ATAwYOM4liM/видео.html

  • @stanitebros
    @stanitebros 6 лет назад +1

    Thanks, but please use a voice with microphone to make it easy for us to understand and provide data as well to practice

    • @AGRONInfoTech
      @AGRONInfoTech  6 лет назад

      Thanks for the suggestion. I shall also share the link in the description of the videos to download the data for practice.

    • @stanitebros
      @stanitebros 6 лет назад +1

      thanks!

    • @AGRONInfoTech
      @AGRONInfoTech  6 лет назад

      You are welcome

  • @TWCanada
    @TWCanada 4 года назад

    This is the model I would like to develop in R. I am trying to use the Location:Treatment interaction df and MSE in the LSD separation test but don't know how to do. Your R code showed the error message from my previous questions.Combined RCBD (treatments fixed, locations random).
    SOV Df Expected Mean Square F-test
    Location l-1 Non-valid
    Rep(Loc) l(r-1) Non-valid
    Treatment t-1 1222−++ΣtrlrLTτσσ T MS/Loc*Trt MS
    Location*Treatment (l-1)(t-1) 22LTrσσ+ Loc*Trt MS/Error MS
    Error l(r-1)(t-1) 2σ
    Total lrt-1

    • @AGRONInfoTech
      @AGRONInfoTech  4 года назад

      Can you send me data containing at least one variable with treatment, location and replications levels at agron.infotech@gmail.com
      I shall run the same model and see what actual problem you are facing and how to fix it.

  • @mamybinzunga4456
    @mamybinzunga4456 Год назад

    hello. I am trying, but I m still having the ANOVA table with "'Nan'" for block, Ea, and Eb in F value and Pr columns. Then, when I continued with the LSD test, I m still getting this message '"Error in qt(1 - alpha/2, DFerror) :Non-numeric argument to mathematical function". How can I solve the issue, please.

    • @AGRONInfoTech
      @AGRONInfoTech  Год назад

      Upon realizing, I noticed that the dataset you shared with me appears to be empty. Please make use of the appropriate data file.

  • @shikhadubey2251
    @shikhadubey2251 4 года назад +1

    Sir..what package should I install to use the model command?

    • @AGRONInfoTech
      @AGRONInfoTech  4 года назад

      Install "agricolae" package by using following command:
      install.packages(agricolae)

    • @AGRONInfoTech
      @AGRONInfoTech  4 года назад

      Also visit blog post on split plot analysis. The link is given in the description of the video.

    • @shikhadubey2251
      @shikhadubey2251 4 года назад

      Thanks

    • @AGRONInfoTech
      @AGRONInfoTech  4 года назад

      You are welcome

    • @shikhadubey2251
      @shikhadubey2251 4 года назад

      Sir..by loading agricolae
      .I didn't get the model command..its showing an error..

  • @adadiawan
    @adadiawan 5 лет назад

    thank you for your video, but i still confused, some script is error symbol in Rstudio, start from "install.packages("agricolae" dependecies = TRUE)" and "sp.plot", please help if you have new script, thank you

    • @AGRONInfoTech
      @AGRONInfoTech  5 лет назад

      Can you share what error you get while installing package sp.plot? Or send screen shot at agron.infotech@gmail.com

  • @ChoppedChicken
    @ChoppedChicken 3 года назад

    The interaction effect was not significant, yet you perform a post hoc test, why? Second question: What does it mean when Ea and Eb have p

    • @AGRONInfoTech
      @AGRONInfoTech  3 года назад

      When main or interaction effect is non significant then there is no need to go for mean comparison test however I have just performed it to show the way in case if you have significant interaction.
      Ea and Eb are the error terms they don't have probability values. Only rep, factor A, factor B and interaction contain p value.

    • @ChoppedChicken
      @ChoppedChicken 3 года назад

      @@AGRONInfoTech Thanks for your quick reply!

    • @AGRONInfoTech
      @AGRONInfoTech  3 года назад

      You are most welcome

  • @hamzayalcin6240
    @hamzayalcin6240 6 лет назад

    thanks for this video.
    I have a problem.
    when I run this circle :
    out3

    • @AGRONInfoTech
      @AGRONInfoTech  6 лет назад

      Can you copy and send me complete commands that you used during analysis in R at agron.infotech@gmail.com
      I shall probably lookover what actual issue you are facing and also the data you have used for at least one response variable or yield.

  • @Techjahangir1978
    @Techjahangir1978 4 года назад

    Dear sir, please help me to analysis three factorial data, what will be model, model

    • @AGRONInfoTech
      @AGRONInfoTech  4 года назад

      Do you want three factor factorial analysis or three factor with split split plot arrangement?

    • @AGRONInfoTech
      @AGRONInfoTech  4 года назад

      For three factor factorial use below command
      results

    • @Techjahangir1978
      @Techjahangir1978 4 года назад

      @@AGRONInfoTech I want to analysis three factorial split split design

    • @AGRONInfoTech
      @AGRONInfoTech  4 года назад

      Use below command for split split plot analysis
      ssp.plot(block, pplot, splot, ssplot, Y)
      Where
      block = replictions
      pplot = Main plot factor
      splot = Sub plot factor
      ssplot = sub-subplot factor
      Y = response variable (e.g yield)
      You need to load library agricolae before using this command
      require(agricolae)
      Also use attach function before using ssp.plot function
      attach(datafilename)

    • @Techjahangir1978
      @Techjahangir1978 4 года назад +1

      @@AGRONInfoTech Thanks for your collaboration

  • @alokjayara3631
    @alokjayara3631 2 года назад

    model

    • @AGRONInfoTech
      @AGRONInfoTech  2 года назад

      Load package agricolae:
      library(agricolae)

  • @surajkarkee4471
    @surajkarkee4471 3 года назад

    Thank you for the video sir, it helps me lot
    I have an issue while performing mean separation of interaction. Please help me..
    #Error in names(DUNCAN)

    • @AGRONInfoTech
      @AGRONInfoTech  3 года назад

      May be you have not attached the components of the data file. Using below command may fix the it.
      attach(data)
      If still have some issues please let me know

    • @surajkarkee4471
      @surajkarkee4471 3 года назад

      @@AGRONInfoTech View(SPP)
      attach(SPP)
      rep=as.factor(Rep)
      Mainplot=as.factor(Mip)
      subplot=as.factor(Sup)
      model

    • @AGRONInfoTech
      @AGRONInfoTech  3 года назад

      Send me output of the command str(SPP) at agron.infotech@gmail.com

  • @blueb7995
    @blueb7995 5 лет назад

    How do i rearrange the x-axis? I found that if it is 25:a, 50:a, 100:a, it starts with 100:a, then 25:a, 50:a.

    • @AGRONInfoTech
      @AGRONInfoTech  5 лет назад

      You may reverse the sequence. Let me know what sequence you used?

    • @blueb7995
      @blueb7995 5 лет назад

      @@AGRONInfoTech Thanks for your response. I have created a dummy csv file (drive.google.com/file/d/1aQuOODDLtkUI5K97f-HvXutxfX79v38Z/view?usp=sharing). Let's say the sequence I need is 20:a, 20:b:40:a,60:a,80:a,100:a,40:b,60:b,80:b,100:b.

  • @TWCanada
    @TWCanada 4 года назад

    Response: Yield
    Df Sum Sq Mean Sq F value Pr(>F)
    Site 5 61735 12347.1 445.2227

    • @AGRONInfoTech
      @AGRONInfoTech  4 года назад

      In video tutorial follow instructions at 3:22 glb and Eb commands are used to represent Error df and Error MS for the interaction term. And then use out1 command to get LSD test. If you still did not get point let me know.

  • @danielaboagye8538
    @danielaboagye8538 2 года назад

    agricolae package is not working on later Rstudio versions. How can I fix this?

    • @AGRONInfoTech
      @AGRONInfoTech  2 года назад

      Can you show the error message? Which version of R you are using? On my side there is no issue with agricolae package.

    • @danielaboagye8538
      @danielaboagye8538 2 года назад

      @@AGRONInfoTech RStudio Desktop 2022.02.0+443. Prairie Trillium Release. Here is the error code - > library(agricolae)
      Error: package or namespace load failed for ‘agricolae’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
      there is no package called ‘klaR’
      In addition: Warning messages:
      1: package ‘lmerTest’ was built under R version 3.6.2
      2: package ‘lme4’ was built under R version 3.6.2
      3: package ‘agricolae’ was built under R version 3.6.2

    • @AGRONInfoTech
      @AGRONInfoTech  2 года назад

      Have you successfully installed agricolae package keeping dependencies as TRUE?
      Try using below command in console to reinstall this package.
      install.packages("agricolae", dependencies = T)

    • @danielaboagye8538
      @danielaboagye8538 2 года назад

      @@AGRONInfoTech Thank you very much for your suggestion. I tried the command but still not working. Error: package or namespace load failed for ‘agricolae’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
      there is no package called ‘klaR’
      In addition: Warning message:
      package ‘agricolae’ was built under R version 3.6.2

    • @AGRONInfoTech
      @AGRONInfoTech  2 года назад +1

      @@danielaboagye8538 Also try install R version 3.6.2

  • @AnaEspnol
    @AnaEspnol 10 месяцев назад

    Hi, I have two years of collected data from split-plot experiments. I am a new user of R, So, I am looking for help from anyone to combine the analysis of my experiment with full mainplot error and subplot error. Thank you!

    • @AGRONInfoTech
      @AGRONInfoTech  10 месяцев назад

      Hi you can share the data at agron.infotech@gmail.com and I shall send you the analysis with Rscript.

  • @bc.cc.la.5194
    @bc.cc.la.5194 3 года назад

    Thank you for the Wonderful video!!
    I have some question, accordind to the website: www.ndsu.edu/faculty/horsley/splplot.pdf
    there are two different LSD value to calculate while we are comparing interaction treatments means in SPD,
    (1) comparision: To compare two subplot treatment means for the same whole plot treatment. (e.g. super:4w v.s. super:3w).
    (2) comparision: To compare two whole plot means at the same or different sub plot treatments (e.g. shaheen:4w v.s. super:2w) or (e.g. shaheen:2w v.s. super:2w).
    In this video, the result of "out3" conformed to the (1) comparision, that means, the value of LSD (out3)=4.132411 Only can used in comparing sub-factor"age" for the same main-factor "var". IT's Not Suitable for all interaction treatments means of comparision. We need to calculate another LSD value for the (2) comparision.
    Please let me know if i am wrong, and how to calculate the LSD value for the (2) situation??
    Looking for your reply, thank you very much!!

  • @vanquinguyen1051
    @vanquinguyen1051 3 года назад

    Hello. I have tried testing with duncan.test for the interaction analysis but it didn't work. For my data, I typed as: duncan.test (data, response, main-factor:sub-factor, Edf_b, EMS_b, alpha=0.05, group=TRUE, console=TRUE), it returned an error as: Error in names(DUNCAN)

    • @AGRONInfoTech
      @AGRONInfoTech  3 года назад

      Before analysis of variance you need to convert factor variables from character to factor by using below command:
      data$main-factor = as.factor(data$main-factor)
      data$sub-factor = as.factor(data$sub-factor)
      Then run ANOVA followed by duncan.test
      Hope this will fix the issue. If still have an error share me your data at agron.infotech@gmail.com

    • @vanquinguyen1051
      @vanquinguyen1051 3 года назад +1

      Thank you for your reply. I followed what you has suggested but it showed the same error. It only work with LSD.test. I will send the data to your email. Thank you.

    • @AGRONInfoTech
      @AGRONInfoTech  3 года назад

      The issue was resolved by using attach(data) function after conversion of variables (character) to factor variables.