Skip to content

Commit 731ecc9

Browse files
committed
headers for mcmc page
1 parent 4a75bd2 commit 731ecc9

1 file changed

Lines changed: 120 additions & 115 deletions

File tree

ui.R

Lines changed: 120 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ url = {http://statnetproject.org}
218218
#' values of input or output objects. When the condition is false, the panel
219219
#' does not take up any space in the UI.
220220

221-
br(),
221+
222222
fluidRow(
223223
column(7,
224224
tabsetPanel(id='datatabs',
@@ -425,8 +425,7 @@ url = {http://statnetproject.org}
425425
p("Calculation in progress..."),
426426
img(src="ajax-loader.gif")
427427
),
428-
429-
br(),
428+
430429
fluidRow(
431430
column(7,
432431
tabsetPanel(id='plottabs',
@@ -764,9 +763,14 @@ url = {http://statnetproject.org}
764763

765764
fluidRow(
766765
column(2,
767-
p('Network:', verbatimTextOutput('currentdataset1'))),
766+
tabsetPanel(
767+
tabPanel("Network",
768+
verbatimTextOutput('currentdataset1')))
769+
),
768770

769771
column(5,
772+
tabsetPanel(
773+
tabPanel("ergm Formula",
770774
p("Type in term(s) and their arguments. For multiple terms, separate with '+'. "),
771775
fluidRow(
772776
fluidRow(
@@ -791,7 +795,7 @@ url = {http://statnetproject.org}
791795
actionButton('termdocButton', label = NULL, icon=icon('book')))
792796
)
793797
)
794-
),
798+
))),
795799
column(5,
796800
tabsetPanel(
797801
tabPanel("Term Documentation",
@@ -865,8 +869,6 @@ url = {http://statnetproject.org}
865869
column(10,
866870
verbatimTextOutput('prefitsum'))),
867871
tags$hr(),
868-
p(strong('Results'),br(),
869-
'Check for model degeneracy in the "Diagnostics" tab.'),
870872
fluidRow(column(12,
871873
uiOutput('savemodel'),
872874
bsActionButton('clearmodelButton',
@@ -897,118 +899,121 @@ actionLink('fitright', icon=icon('arrow-right', class='fa-2x'), label=NULL)
897899
),
898900
#' **MCMC Diagnostics**
899901
#'
900-
#+ eval=FALSE
901-
# navbarMenu('Diagnostics',
902-
tabPanel(title='MCMC Diagnostics', value='tab5',
903-
#include progress bar when this tab is loading
904-
div(class = "busy",
905-
p("Calculation in progress..."),
906-
img(src="ajax-loader.gif")
907-
),
908-
909-
fluidRow(
910-
column(2,
911-
p('Network:', class="nwlabel"), verbatimTextOutput('currentdataset_mcmc')),
912-
column(10,
913-
p('ergm formula:',style="display:inline;"),
914-
uiOutput('uichoosemodel_mcmc'),
915-
verbatimTextOutput('checkterms_mcmc'))
916-
),
917-
br(),
918-
tags$hr(),
919-
tabsetPanel(id='mcmctabs',
920-
tabPanel('Plot',
921-
#intercept error and give friendly message when MCMC doesn't run
922-
conditionalPanel(condition="output.diagnostics == 'MCMC was not run or MCMC sample was not stored.'",
923-
column(1,span(class='helper', id='mcmchelper', icon('question-circle')),
924-
style='width:20px; margin-left:0px'),
925-
column(11,pre('MCMC was not run or MCMC sample was not stored.'),
926-
style='margin-left:0px;'),
927-
column(3,
928-
div(class='mischelperbox', id='mcmchelpbox',
929-
"MCMC is only run when at least one of the terms in the model represents",
930-
"dyad dependence (e.g., degree terms, or triad related terms). For",
931-
"models with only dyadic independent terms, estimation relies on",
932-
"traditional maximum likelihood algorithms used for generalized linear",
933-
"models."))
934-
),
935-
uiOutput('diagnosticsplotspace'),
936-
downloadButton('mcmcplotdownload',label = 'Download Plots')),
937-
tabPanel('Summary',
938-
verbatimTextOutput('diagnostics'))
939-
),
940-
div(id='mcmctabhelp', class='helper-btn', icon('question-circle', 'fa-2x')),
941-
div(class="helper-box", style="display:none",
942-
p('Check for model degeneracy. When a model converges properly',
943-
'the MCMC sample statistics should vary randomly around the',
944-
'observed values at each step, and the difference between the',
945-
'observed and simulated values of the sample statistics should',
946-
'have a roughly bell shaped distribution, centered at 0.')),
947-
actionLink('mcmcleft', icon=icon('arrow-left', class='fa-2x'), label=NULL),
948-
actionLink('mcmcright', icon=icon('arrow-right', class='fa-2x'), label=NULL)
949-
950-
),
902+
#+ eval=FALSE
903+
tabPanel(title='MCMC Diagnostics', value='tab5',
904+
#include progress bar when this tab is loading
905+
div(class = "busy",
906+
p("Calculation in progress..."),
907+
img(src="ajax-loader.gif")
908+
),
909+
910+
fluidRow(
911+
column(2,
912+
tabsetPanel(
913+
tabPanel("Network",
914+
verbatimTextOutput('currentdataset_mcmc')
915+
))),
916+
column(10,
917+
tabsetPanel(
918+
tabPanel("ergm Formula",
919+
verbatimTextOutput('checkterms_mcmc'),
920+
uiOutput('uichoosemodel_mcmc')
921+
)))
922+
),
923+
br(),
924+
tags$hr(),
925+
tabsetPanel(id='mcmctabs',
926+
tabPanel('Plot',
927+
#intercept error and give friendly message when MCMC doesn't run
928+
conditionalPanel(condition="output.diagnostics == 'MCMC was not run or MCMC sample was not stored.'",
929+
column(1,span(class='helper', id='mcmchelper', icon('question-circle')),
930+
style='width:20px; margin-left:0px'),
931+
column(11,pre('MCMC was not run or MCMC sample was not stored.'),
932+
style='margin-left:0px;'),
933+
column(3,
934+
div(class='mischelperbox', id='mcmchelpbox',
935+
"MCMC is only run when at least one of the terms in the model represents",
936+
"dyad dependence (e.g., degree terms, or triad related terms). For",
937+
"models with only dyadic independent terms, estimation relies on",
938+
"traditional maximum likelihood algorithms used for generalized linear",
939+
"models."))
940+
),
941+
uiOutput('diagnosticsplotspace'),
942+
downloadButton('mcmcplotdownload',label = 'Download Plots')),
943+
tabPanel('Summary',
944+
verbatimTextOutput('diagnostics'))
945+
),
946+
div(id='mcmctabhelp', class='helper-btn', icon('question-circle', 'fa-2x')),
947+
div(class="helper-box", style="display:none",
948+
p('Check for model degeneracy. When a model converges properly',
949+
'the MCMC sample statistics should vary randomly around the',
950+
'observed values at each step, and the difference between the',
951+
'observed and simulated values of the sample statistics should',
952+
'have a roughly bell shaped distribution, centered at 0.')),
953+
actionLink('mcmcleft', icon=icon('arrow-left', class='fa-2x'), label=NULL),
954+
actionLink('mcmcright', icon=icon('arrow-right', class='fa-2x'), label=NULL)
955+
956+
),
951957
#' **Goodness of Fit**
952958
#'
953959
#+ eval=FALSE
954-
tabPanel(title='Goodness of Fit',value='tab6',
955-
956-
#include progress bar when this tab is loading
957-
div(class = "busy",
958-
p("Calculation in progress..."),
959-
img(src="ajax-loader.gif")
960-
),
961-
962-
fluidRow(
963-
column(2,
964-
p('Network:', class="nwlabel"),
965-
verbatimTextOutput('currentdataset_gof')),
966-
column(10,
967-
p('ergm formula:',style="display:inline;"),
968-
uiOutput('uichoosemodel_gof'),
969-
verbatimTextOutput('checkterms_gof'))
970-
),
971-
p('If you do not specify a term the default formula for undirected
972-
networks is ', code('~ degree + espartners + distance'), 'and for
973-
directed networks is ', code('~ idegree + odegree + espartners +
974-
distance'), '.'),
975-
fluidRow(
976-
column(3, selectInput('gofterm', 'Goodness of Fit Term:',
977-
c(Default='', 'degree', 'distance', 'espartners',
978-
'dspartners', 'triadcensus', 'model'),
979-
selectize = FALSE))),
980-
fluidRow(
981-
column(3, actionButton('gofButton', 'Run'))),
982-
br(),
983-
tabsetPanel(
984-
tabPanel("Current Model",
985-
fluidRow(
986-
column(5,
987-
verbatimTextOutput('gofsummary')),
988-
column(7,
989-
uiOutput('gofplotspace'),
990-
downloadButton('gofplotdownload', label = 'Download Plots')))
991-
),
992-
tabPanel("Compare Models",align="center",
993-
uiOutput('gofplotcompspace'),
994-
fluidRow(align="left",
995-
downloadButton('gofplotcompdownload',
996-
label='Download Plots'),
997-
br())
998-
)
999-
),
1000-
1001-
div(id='goftabhelp', class='helper-btn', icon('question-circle', 'fa-2x')),
1002-
div(class="helper-box", style="display:none",
1003-
p('Test how well your model fits the original data by choosing a network',
1004-
'statistic that is not in the model, and comparing the value of this',
1005-
'statistic observed in the original network to the distribution of values',
1006-
'you get in simulated networks from your model.')),
1007-
actionLink('gofleft', icon=icon('arrow-left', class='fa-2x'), label=NULL),
1008-
actionLink('gofright', icon=icon('arrow-right', class='fa-2x'), label=NULL)
1009-
),
960+
tabPanel(title='Goodness of Fit',value='tab6',
961+
962+
#include progress bar when this tab is loading
963+
div(class = "busy",
964+
p("Calculation in progress..."),
965+
img(src="ajax-loader.gif")
966+
),
967+
968+
fluidRow(
969+
column(2,
970+
p('Network:', class="nwlabel"),
971+
verbatimTextOutput('currentdataset_gof')),
972+
column(10,
973+
p('ergm formula:',style="display:inline;"),
974+
uiOutput('uichoosemodel_gof'),
975+
verbatimTextOutput('checkterms_gof'))
976+
),
977+
p('If you do not specify a term the default formula for undirected
978+
networks is ', code('~ degree + espartners + distance'), 'and for
979+
directed networks is ', code('~ idegree + odegree + espartners +
980+
distance'), '.'),
981+
fluidRow(
982+
column(3, selectInput('gofterm', 'Goodness of Fit Term:',
983+
c(Default='', 'degree', 'distance', 'espartners',
984+
'dspartners', 'triadcensus', 'model'),
985+
selectize = FALSE))),
986+
fluidRow(
987+
column(3, actionButton('gofButton', 'Run'))),
988+
br(),
989+
tabsetPanel(
990+
tabPanel("Current Model",
991+
fluidRow(
992+
column(5,
993+
verbatimTextOutput('gofsummary')),
994+
column(7,
995+
uiOutput('gofplotspace'),
996+
downloadButton('gofplotdownload', label = 'Download Plots')))
997+
),
998+
tabPanel("Compare Models",align="center",
999+
uiOutput('gofplotcompspace'),
1000+
fluidRow(align="left",
1001+
downloadButton('gofplotcompdownload',
1002+
label='Download Plots'),
1003+
br())
1004+
)
1005+
),
1006+
1007+
div(id='goftabhelp', class='helper-btn', icon('question-circle', 'fa-2x')),
1008+
div(class="helper-box", style="display:none",
1009+
p('Test how well your model fits the original data by choosing a network',
1010+
'statistic that is not in the model, and comparing the value of this',
1011+
'statistic observed in the original network to the distribution of values',
1012+
'you get in simulated networks from your model.')),
1013+
actionLink('gofleft', icon=icon('arrow-left', class='fa-2x'), label=NULL),
1014+
actionLink('gofright', icon=icon('arrow-right', class='fa-2x'), label=NULL)
1015+
),
10101016

1011-
# ),
10121017
#' **Simulations**
10131018
#'
10141019
#+ eval=FALSE

0 commit comments

Comments
 (0)