Pmg -- Poor Man's GUI An R GUI For Introductory Statistics

1y ago
9 Views
2 Downloads
639.88 KB
31 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Kian Swinton
Transcription

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics coursepmg – Poor Man’s GUIan R GUI for Introductory StatisticsJohn VerzaniCUNY/The College of Staten IslanduseR!2007Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics course1What is PMG?The basic GUI2Using PMG for typical tasks in an introductory statistics courseExploratory Data AnalysisSummary statisticsWhy dynamic dialogs?Statistical InferenceLinear ModelingExtending pmg3ClosingClosing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics coursePMG is a graphical user interface (GUI) for RIt is similar to the Rcmdr interface, only using a more moderntoolkitIt is cross-platform (Windows, mac and linux). (It usesRGtk2.)It takes advantage of the drag-and-drop features of RGtk2 formany of its dialogs.It is well suited for introductory statistics coursesClosing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseStarting pmgThe pmg package must first be installed. It relies on a few CRANpackages, most importantly the RGtk2 package. (This ismulti-platform, but for some platforms system libraries need to beinstalled).A command likeinstall pmg install.packages("pmg", dep TRUE)Might just work. (A script is available for windows to downloadthe gtk libraries.)The GUI is started with:Start GUI require(pmg)Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseThe basic GUIFigure: PMG on startupClosing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseGUI Pieces: The menu barFigure: PMG menubar and toolbarClosing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseThe quick drop areaFigure: PMG quick drop areaClosing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseA notebook to hold dialogsFigure: PMG dialog areaClosing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseCommand lineFigure: PMG command areaClosing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseLoading a data setLoading a data set can be done through the dialogData::Loaddata setFigure: Loading a data set. Double click the data set name.Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseWorkspace browser areaA data set when loaded appears in the workspace browser area.Figure: Data set appearing in workspace browser areaClosing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseOther useful dialogsThere are similar dialogs toInstall a CRAN package (install.packages)Load a package (require)Save and restore a workspaceSource a fileBrowse the help systemClosing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseA boxplotThere are atleast two ways to do most basic things in pmg.simple dialogs which gather a function’s arguments and callthe function when “ok” is selected. These print out an Rcommand for students to learnA “dynamic dialog” which can be directed easily using just themouse through drag and drop or clicking, but which does nottry to teach the students the R syntax.One is more instructive and flexible, the other easier to learn.Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseThe Plots::Univariate::Boxplot dialogThe first way is illustrated with thePlots::Univariate::Boxplot dialog. The figure shows thedialog after some values were filled in.Figure: Basic boxplot dialog for png. There are means to modify each ofthe boxplot function’s arguments.Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseSimple dialogs (cont.)There are a few conveniences with these simple dialogs.The variable Cars93 MPG.highway was dragged over fromthe variable browser. This could be typed in. Expressions,such as rnorm(100), are okay, as this value gets evaluatedwithin the global environment.The “help” button will call up the help page for the function(boxplot), and each label for the arguments, when clicked, willcall up the corresponding section from the help page toexplain that argument.Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseLattice explorerThe lattice explorer ( Plots::Lattice explorer) is a “dynamicdialog” and can be used to drag variables from the workspace areato create plots. Dragging and dropping the MPG.highway variable,and changing the graphic selector gives the figure.Figure: Boxplot produces using the Lattice ExplorerClosing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseLattice explorer: multivariateThe lattice explorer makes multi-variate explorations easy.Dropping a factor onto the graphic will produce the followingfigure.Figure: Lattice explorer after a factor is dropped following a numericvariable.Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseLattice explorer (cont.)Changing the plot selector will produce a different graphic. Useclear to start over with new variables.Unlike the other dialog, there is no way to change things such asthe title or orientation, etc. Again, the trade-off between easier tolearn versus flexibility.Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseQuantilesThe basic dialogs are more or less generated from the underlying Rfunction’s arguments. A few have been optimized such as thequantile dialog.Figure: The Data::Quantiles dialog showing a graphic in addition to asummary.Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseThe meanSimilarly there are dialogs to compute summary statistics, such asthe mean. There is a basic dialog where any applicable argumentscan be entered (blanks are left out)Figure: basic dialog for the mean where a few arguments can be adjusted.Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics coursecont.The output of the R command appears in the command area:Figure: Command area showing output from finding the meanUnlike the next dynamic dialog, these dialogs produce an Rcommand that can be copied and pasted into a word processor forreport writing or, if desired, edited in the commands area.Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics coursethe mean using the Dynamic summaries featureAs with the Lattice explorer, there is a more interactive dialog forfinding the mean under Data::Dynamic summaries. We draggedtwo variables over to produce the following:Figure: Dynamic summaries dialog showing how to find the mean forgrouped data.Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseWhy dynamicSome of the design of pmg was influenced by the Fathom DynamicData software of Key Curriculum Press. There the graphics aretightly linked with a data frame viewer. The data frame viewer inpmg can be used the same way. First, drag the data set over theData tab and onto the Open button. This will open it in the dataframe editor.Then drag a column header onto a drop area for a dynamic dialog;and then click open the subset area and select a variable toadjust. The dialog should adjust accordingly.Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseThe t testStatistical inference has similar functionality. There is a t-testdialog that can be used. In this case we show the bivariate t-testFigure: A two-sample t-testClosing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseDynamic testsThe Tests::Dynamic tests dialog takes its output from that ofthe htest class. It should look more or less familiar. The bold text,when clicked, allows for editing of those parameter values. One canuse a formula interface by selecting from the top popup widget.Figure: Dynamic tests dialog showing a two-sample t-test. The boldareas allow for editing.Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseLinear modelingAnother common topic in an introductory statistics course is thesimple linear model. Again there are two different ways to do this.Figure: Simple dialog for lm. The formula was added using the dialog forediting formulas.Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseSimple lm dialog cont.The model formula editing dialog was modeled on one from S-PlusFigure: Model formula editing dialogClosing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseThe dynamic models dialogThe dynamic models dialog for linear regression is intended to beused in a drag-and-drop manner. The model formula are built upin a simple manner. (They can be edited if desired). Some quickactions are available from a popup-box on the right.Figure: The dynamic models dialog. Dropping variables produces asimple model formula without interactionsClosing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseExtending the GUIOne of the neat parts of Rcmdr has been the interest in extendingthe GUI (RcmdrPlugin.TeachingDemos,Rcmdr.HH, TsCmdr, .)for specific purposes.Currently, no plug-in architecture is supported, but there is ameans to add to the toolbar using pmg.addMenubar.Additionally, pmg is written using the gWidgets package whichmakes it relatively easy to develop new GUIs. Yvonnick Noelcontributed several that are available under the Plots::TeachingDemos dialog.Closing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseTeaching Demos DialogFigure: Teaching demos notebookClosing

OutlineWhat is PMG?Using PMG for typical tasks in an introductory statistics courseWhat is lacking?Hopefully you’ve been convinced that pmg offers an easy-to-learnGUI for R that can easily handle most tasks of an introductorystatistics course. Of course, pmg could be improved. Here are someimmediate areas:There is no report writing functionalityI like the dynamic dialogs, the others have a “website” feel.Are either the right metaphor for introductory students? The“inference for office” project of Josh van Eikeren provides analternative akin to Mathematica worksheets. (Windows only)Rcmdr has a more advanced set of dialogs.Rcmdr has spawned a number of topic specific spinoffs (e.g.,TsCmdr). Easily adding new menu items could be improved.Closing

Outline What is PMG? Using PMG for typical tasks in an introductory statistics course Closing Linear modeling Another common topic in an introductory statistics course is the simple linear model. Again there are two different ways to do this. Figure: Simple dialog for lm. The formula was added using the dialog for editing formulas.

Related Documents:

layout and the components of the GUI Changes to this file are made in the Layout Editor - .m file - contains the code that controls the GUI You can program the callbacks in this file using the M-file Editor 28 Creating a GUI Typical stages of creating a GUI are: 1. Designing the GUI 2. Laying out the GUI - Using the Layout Editor 3.

R438. Reguladores. 3971 es - 1.2 - Sistema di excitación PMG. Este sistema de excitación utiliza una «PMG» (generador de imán permanente). Éste, acoplado en la parte trasera de la má quina, está conectado al regulador de ten sión R438. La PMG alimenta al regulador con una ten sión constante e independiente del bobina

Java GUI libraries Swing: the main Java GUI library – Benefits: Features; cross-platform compatibility; OO design – Paints GUI controls itself pixel-by-pixel Does not delegate to OS’s window system Abstract Windowing Toolkit (AWT): Sun's initial GUI library – Maps Java code to each operating system's real GUI system

No change in API which Apps refer to Apps can use API of each GUI-lib. Each GUI-lib has layer to adapt to PF Can have many different GUI-libs without change of PF. HMI Apps App FW Layer Service Layer AppLayer GUI-library GUI-lib PAL(*) ForAGL PF *PF Adaptation Layer HMI-Server (e.g.

Poor air distribution Poor humidity control VAV Problems Solved with DOAS/Parallel FCU Poor acoustical properties Poor use of plenum and mechanical shaft space Serious control problems, particularly with tracking return fan systems Pd 18 Poor energy transport medium: air Poor resistance to the threat of biological and chemical terrorism

2.1.2-Graphical User interface GUI in Java A Graphical User Interface (GUI) is a human friendly way to interact with computer applications. A GUI gives an application certain ‘look and feel’. A GUI is built from components, and these are the components with which user interacts, operates and controls the application [2].

(2) labelling screenshots of these applications with widget data re trieved through GUI ripping based on the Java Swing API. The trained network can then predict the location and dimensions of widgets from screen shots during test generation, and thus inlu ence where and how the GUI tester interacts with the application. 3.1 Identifying GUI Widgets