R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("dr-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('dr') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "dr.M" > > ### * dr.M > > flush(stderr()); flush(stdout()) > > ### Name: dr.M > ### Title: ~~function to do ... ~~ > ### Aliases: dr.M dr.M.ols dr.M.sir dr.M.save dr.M.phd dr.M.phdy dr.M.phdq > ### dr.M.mphdq dr.M.phdres dr.M.msir dr.M.mphd dr.M.mphdres > ### Keywords: internal > > ### ** Examples > > ##---- Should be DIRECTLY executable !! ---- > ##-- ==> Define data, use random, > ##-- or do help(data=index) for the standard data sets. > > ## The function is currently defined as > function(object, ...){UseMethod("dr.M")} function (object, ...) { UseMethod("dr.M") } > > > > cleanEx(); ..nameEx <- "dr" > > ### * dr > > flush(stderr()); flush(stdout()) > > ### Name: dr > ### Title: Dimension reduction regression > ### Aliases: dr dr.compute plot.dr print.dr summary.dr print.summary.dr > ### Keywords: regression > > ### ** Examples > > library(dr) > data(ais) > attach(ais) # the Australian athletes data > #fit dimension reduction using sir > m1 <- dr(LBM~Wt+Ht+RCC+WCC, method="sir", nslices = 8) > summary(m1) Call: dr(formula = LBM ~ Wt + Ht + RCC + WCC, method = "sir", nslices = 8) Method: sir with 8 slices, n = 202, using weights. Slice Sizes: 26 26 25 25 25 27 30 18 Eigenvectors: Dir1 Dir2 Dir3 Dir4 Wt -0.11361 -0.019915 -0.24571 -0.02852 Ht -0.05112 0.001870 0.42387 0.01375 RCC -0.99108 0.999192 -0.86952 0.22637 WCC 0.04742 -0.034861 0.06249 0.97353 Dir1 Dir2 Dir3 Dir4 Eigenvalues 0.8774 0.1501 0.03948 0.01741 R^2(OLS|dr) 0.9986 0.9986 0.99977 1.00000 Asymp. Chi-square tests for dimension: Stat df p-value 0D vs >= 1D 219.041 28 0.000000 1D vs >= 2D 41.816 18 0.001173 2D vs >= 3D 11.492 10 0.320513 3D vs >= 4D 3.517 4 0.475320 > # repeat, using save: > m2 <- update(m1,method="save") > summary(m2) Call: dr(formula = LBM ~ Wt + Ht + RCC + WCC, method = "save", nslices = 8) Method: save with 8 slices, n = 202, using weights. Slice Sizes: 26 26 25 25 25 27 30 18 Eigenvectors: Dir1 Dir2 Dir3 Dir4 Wt -0.1286546 -0.2446 0.01181 -0.02966 Ht -0.0001065 0.4499 0.01632 0.02518 RCC -0.9863290 -0.6178 -0.98611 0.95968 WCC 0.1029710 0.5968 -0.16484 -0.27839 Dir1 Dir2 Dir3 Dir4 Eigenvalues 0.8028 0.3835 0.181 0.09166 R^2(OLS|dr) 0.9881 1.0000 1.000 1.00000 > # repeat, using phd: > m3 <- update(m2, method="phdres") > summary(m3) Call: dr(formula = LBM ~ Wt + Ht + RCC + WCC, method = "phdres", nslices = 8) Method: phdres, n = 202, using weights. Eigenvectors: Dir1 Dir2 Dir3 Dir4 Wt -0.02246 -0.02482 -0.13048 -0.1463 Ht 0.00981 0.19216 0.00483 0.2390 RCC 0.99955 -0.22063 -0.60190 -0.9164 WCC -0.01705 0.95592 0.78783 -0.2859 Dir1 Dir2 Dir3 Dir4 Eigenvalues -1.51312 1.4274 1.1651 -0.4919 R^2(OLS|dr) 0.00701 0.3283 0.9613 1.0000 Asymp. Chi-square tests for dimension: Stat df Normal theory Indep. test General theory 0D vs >= 1D 42.341 10 6.521e-06 0.001978 0.02776 1D vs >= 2D 25.984 6 2.242e-04 NA 0.01815 2D vs >= 3D 11.427 3 9.626e-03 NA 0.04887 3D vs >= 4D 1.729 1 1.886e-01 NA 0.16545 > # repeat, using weights: > w1 <- dr.weights(LBM~Wt+Ht+RCC+WCC, covmethod="mve") Loading required package: MASS > m4 <- dr(LBM~Wt+Ht+RCC+WCC, method="sir", nslices = 8, weights=w1) > > > > cleanEx(); ..nameEx <- "dr.directions" > > ### * dr.directions > > flush(stderr()); flush(stdout()) > > ### Name: dr.directions > ### Title: Directions selected by dimension reduction regressiosn > ### Aliases: dr.direction dr.directions dr.direction.default > ### Keywords: regression > > ### ** Examples > > library(dr) > data(ais) > attach(ais) # the Australian athletes data > #fit dimension reduction using sir > m1 <- dr(LBM~Wt+Ht+RCC+WCC, method="sir", nslices = 8) > summary(m1) Call: dr(formula = LBM ~ Wt + Ht + RCC + WCC, method = "sir", nslices = 8) Method: sir with 8 slices, n = 202, using weights. Slice Sizes: 26 26 25 25 25 27 30 18 Eigenvectors: Dir1 Dir2 Dir3 Dir4 Wt -0.11361 -0.019915 -0.24571 -0.02852 Ht -0.05112 0.001870 0.42387 0.01375 RCC -0.99108 0.999192 -0.86952 0.22637 WCC 0.04742 -0.034861 0.06249 0.97353 Dir1 Dir2 Dir3 Dir4 Eigenvalues 0.8774 0.1501 0.03948 0.01741 R^2(OLS|dr) 0.9986 0.9986 0.99977 1.00000 Asymp. Chi-square tests for dimension: Stat df p-value 0D vs >= 1D 219.041 28 0.000000 1D vs >= 2D 41.816 18 0.001173 2D vs >= 3D 11.492 10 0.320513 3D vs >= 4D 3.517 4 0.475320 > dr.directions(m1) Dir1 Dir2 Dir3 Dir4 1 -0.479276251 -0.819602966 6.42320190 0.315508181 2 -0.059119912 -0.319834740 4.55965639 1.239260923 3 1.262484253 -0.391284075 0.84649411 -2.047011907 4 0.279417644 -0.533757942 2.51801869 -1.828130802 5 1.204228318 -0.041947393 4.67742242 -0.002627047 6 2.081443241 -0.309901669 0.55994636 -2.538441932 7 -0.014226827 -0.337649473 2.77904008 -1.774907400 8 1.995221818 -0.007972659 0.62216329 -1.163242473 9 1.911406040 -0.327563572 -1.12280474 1.772084878 10 1.464374940 0.126734995 2.90082274 -2.341666176 11 -3.175943060 -0.344712850 0.29850567 -2.187089772 12 -0.388514086 -0.098920404 3.62041823 0.268148543 13 2.324914990 -0.173856220 -1.34991126 0.780709388 14 -0.099832592 -0.540058941 -1.94161107 -1.175361596 15 0.589664270 0.019084638 -0.18480946 -1.029431784 16 0.831305661 -0.223864897 1.12415070 -1.233559466 17 0.954756021 -0.776383720 1.66631088 0.071240144 18 1.000575461 -0.125104645 1.63461746 1.286921296 19 -0.491946087 -0.482729274 1.17569022 0.799640814 20 0.193194209 0.225253309 -0.84125365 -0.140519440 21 0.288345271 -0.200680971 -0.07906448 -1.426478294 22 0.782228900 -0.652007812 -1.70218997 -3.959073137 23 1.307532376 -0.243491395 -0.85952457 2.342621741 24 0.482305136 0.503257718 3.16349273 -0.332219133 25 -0.375536002 -0.497463110 1.11225019 -1.448430974 26 0.339844957 -0.177587867 0.51730800 -1.485785071 27 0.067230226 -0.585884469 -0.46247956 -1.504440799 28 0.460599822 -0.253071417 -1.50803389 0.370364883 29 4.618809412 -0.064909471 -3.55614325 0.653241051 30 1.030920339 0.023983293 1.84478562 -0.311711071 31 0.799102832 0.356855762 2.37492823 -0.387776406 32 0.529298499 -0.369696446 0.34719387 2.860962331 33 -0.047623169 -0.314490266 -1.06824485 -0.660740057 34 -0.363817352 -0.351950693 -0.06483602 -1.347178204 35 -0.854427055 0.086643233 1.64862063 0.206174853 36 2.336142503 -0.079622363 2.83665818 6.376953554 37 2.258854688 -0.304397947 0.19504099 -0.968773664 38 1.776078303 -0.409543766 0.91661601 0.543780128 39 2.508674001 -0.107725442 -0.50707647 -0.512420377 40 0.682146608 -0.565058951 2.23643541 -1.323155326 41 1.450349856 -0.424968835 1.39702521 -0.940936267 42 1.440091790 -0.330379470 1.00161786 -2.001466573 43 1.296406733 -0.893283184 -1.55475928 -0.759823379 44 1.781547244 -0.578501689 -0.52484150 -1.633094542 45 1.431702018 -0.257068058 -0.78479647 2.548636865 46 0.648774996 -0.578401073 -0.05855009 3.269719345 47 1.473956079 -0.632266241 3.88538783 -0.711629540 48 1.647384332 -0.678400763 -0.45524389 1.844848842 49 0.906180812 -0.407848045 -2.19482734 2.286163372 50 3.315059876 0.310253221 0.84904028 -1.499638566 51 1.049943542 -0.586764269 -1.73222255 3.332125115 52 0.726335649 -0.384148196 -1.10373466 3.596172342 53 0.506553452 -0.465132564 -3.62223363 1.872866641 54 0.739309898 0.232609261 3.07650278 1.549309528 55 -0.544743816 -0.655293863 -1.58058810 -0.559038953 56 -0.345493697 -0.680979355 -1.57111309 0.919553284 57 2.002696186 -0.533966100 3.10321153 -0.365028036 58 1.877705292 -0.629640211 -1.36329876 1.258659281 59 1.955434957 -0.117847479 -1.56313715 -1.495092695 60 2.920762588 -0.306050248 0.13915787 -1.005918370 61 0.749146533 -0.412517050 1.22145551 -2.185996294 62 0.811848734 -0.547291235 -2.54258050 0.744023912 63 1.060330425 -0.240431957 -1.61330044 1.113327115 64 0.830803568 -0.185330321 1.89674319 -1.186961258 65 1.842148569 -0.133558844 0.80831107 -1.606680393 66 2.874505973 0.239712955 0.79202290 -1.569782934 67 3.055452093 -0.313713439 -2.20931666 -0.018745662 68 2.808958104 -0.002340464 0.16855787 2.617356283 69 1.005343225 0.701601107 -0.37680048 2.673307680 70 -1.082974407 -0.351202912 -5.19405824 -1.731853808 71 -0.087068769 0.007724736 -4.87149522 -0.514635074 72 -0.335283246 -0.465309728 -5.02354822 1.438618701 73 -0.706333937 -0.111952773 -3.86885640 -0.280965999 74 0.001806651 0.530704870 -3.84977597 2.172107730 75 -1.862187629 -0.391034362 -8.17379187 -0.283702969 76 3.989329565 -0.117101824 3.19326861 0.664817768 77 1.579082396 0.281338657 2.32377815 0.832597021 78 3.792440567 -0.048495566 -2.03632650 0.056856826 79 2.167600123 -0.041972536 -2.46935686 -0.898631123 80 3.933738679 -0.088562526 -1.80388503 -0.325584146 81 1.588600008 0.176594572 -1.53917597 -0.053330578 82 4.202756421 -0.155278433 -0.82376550 -0.379897274 83 3.177985586 -0.134029693 -1.20027979 -0.291123459 84 2.673646151 -0.488091090 2.59070417 -0.893046232 85 2.444932529 0.350763326 -3.26261264 0.703586558 86 3.300781652 0.047432128 2.84675524 0.153485390 87 1.851272644 0.347217642 2.40679203 0.494439319 88 2.244932074 0.733003132 -1.09490719 1.500913645 89 1.948476312 0.518778429 0.17562584 1.057912749 90 1.596735763 -0.569596108 -3.86774716 -3.062133377 91 0.904557204 -0.109143266 0.28334294 -2.982918301 92 3.421248485 -0.022297925 -2.47183571 0.990862154 93 2.577654783 -0.357606472 0.71787016 -0.347692910 94 3.529191354 0.810625949 0.83066615 -0.027718106 95 1.987360274 0.806847238 2.12909058 0.660739227 96 4.477983803 0.506288270 -2.22796382 -0.175559591 97 4.788727469 -0.091930383 -1.72438157 2.205926857 98 4.818785500 0.463158446 -2.13484961 -1.524639264 99 6.340760510 0.131526487 -3.67515361 -1.660509931 100 5.250351650 0.263775349 -5.61968400 -0.332333996 101 0.880199368 0.556989818 -1.52881497 0.211248739 102 0.166240554 0.099538134 -1.44430824 0.471320408 103 -1.117935727 0.374999598 -0.30047200 -2.343392848 104 -2.740074596 0.333871752 2.40968802 -2.986464637 105 -2.051757427 0.261071166 3.18332015 -0.368556252 106 -0.653835338 0.252033685 -0.96572286 -0.021948661 107 -1.136545850 0.585383924 -0.09979690 -0.988668204 108 -1.294754164 -0.212329215 -0.73783182 1.227584020 109 -2.384995690 0.469164014 2.38552018 -0.457693764 110 -2.552738974 -0.093373905 -1.44325885 -2.600272782 111 -0.582811488 0.738463979 1.62356405 -1.590286310 112 -1.649767094 -0.013917047 2.94237542 -0.928226785 113 -2.751642991 -0.717097154 -0.84389725 -3.307274121 114 -1.854692337 -0.079889983 1.80073034 0.937525044 115 -1.586268603 0.117646967 -2.11451488 -0.208722294 116 -1.358259027 -0.444936242 1.10919245 -2.013696579 117 -3.302396722 -0.061456994 2.76509549 -1.405523178 118 -1.598039154 -0.238862328 -0.31472852 1.892015894 119 -2.574445575 0.267259312 1.42806516 -0.393306787 120 -2.101783581 0.223442890 -1.02138744 1.098537831 121 2.680171848 0.876903176 -1.50296794 -0.086870023 122 -2.651434897 0.407296021 -1.91673866 -0.492506549 123 -2.563610701 -0.043040514 -0.46514076 -1.954414458 124 -2.722084566 0.261510466 1.86713425 0.294244152 125 -2.471756037 -0.067282694 -2.05525901 2.578654304 126 -3.449971278 -0.226047438 0.51205609 -2.455441746 127 -2.650704250 0.267664523 -0.29536003 -1.256755902 128 -1.856717458 -0.287439409 0.21102018 0.599541948 129 -3.503162987 0.213368034 3.93087701 -0.004207138 130 -1.099293896 -0.185416193 5.56458075 -1.119088627 131 -2.922600010 0.178316930 1.73554199 -1.424506104 132 -2.059212513 0.071169636 0.08770810 -0.568920730 133 -6.298603835 -0.295803569 2.57367889 0.269384505 134 -3.954375122 -0.256703335 4.10041126 0.084468696 135 -3.496922353 -0.758256482 2.01301551 1.523791623 136 -0.920425974 0.005379238 1.85514531 1.158244992 137 -1.912336426 -0.924268153 3.85843809 1.401434577 138 -0.748571556 0.098715073 1.76666743 0.323592181 139 -1.793342421 -0.027324501 3.06412817 -0.745922333 140 -0.858272216 0.044065566 6.24240424 -0.201666515 141 2.292680813 0.152215740 -1.07470196 -1.296002421 142 0.136156185 0.080182706 3.75150707 0.290623909 143 -0.055560955 0.276471701 2.43738723 0.384704957 144 -1.039890633 0.455122379 2.20706201 0.540083716 145 -3.684659184 -0.233501246 -4.89760179 1.106945013 146 -2.731716979 -0.068889727 -2.62542227 2.039430731 147 -0.956454918 0.178871531 0.80899671 -0.785019707 148 1.027810899 0.337356926 -0.27955582 -0.583387681 149 0.275909920 -0.143626611 3.13843149 -2.445127797 150 -0.314425172 0.258951081 0.10750609 -3.073449719 151 0.883292514 0.253206093 -0.11489224 2.022309642 152 1.442948494 0.450326705 1.29597018 0.542858317 153 2.293829513 -0.159697924 1.14267082 -2.341449685 154 -1.265933667 0.386997056 3.61152698 -0.816828207 155 2.634741028 0.150364670 0.59477146 -0.654487818 156 0.490065382 0.277308535 -1.93148230 -1.216269832 157 -0.025123095 0.613368170 0.64560515 -2.797642080 158 -0.800980512 0.152772945 -2.27140678 -2.867900895 159 -1.792665687 0.079129363 1.88671768 1.004231176 160 -5.247020818 0.134629717 -7.66094106 -3.237572148 161 -2.335616369 1.138398899 1.27456039 -0.455649838 162 -2.804428472 -0.227196792 -5.76794237 1.156959405 163 -6.737846039 -0.150281124 -8.70471671 -1.961545702 164 -0.264304288 0.442665217 1.27289346 1.451521215 165 -1.041788369 -0.292613662 0.72196923 1.676639465 166 -1.819223894 1.972576125 -4.16569333 0.347618613 167 0.329589694 0.215753948 1.14019238 -0.340293365 168 0.382803814 0.758433996 0.79606678 0.823845230 169 0.496374884 0.600890536 -2.09844837 -2.281182233 170 0.853593699 0.199631611 1.67351551 -2.034878488 171 0.424174850 0.427182146 -1.58916080 -1.741564528 172 0.321022386 0.347853229 -0.08805855 0.241430224 173 -0.284440238 0.889720852 -0.44126232 -0.909793496 174 0.295223149 0.944288951 -2.98821165 1.015055317 175 1.150463378 0.566066510 1.78080599 -0.108327263 176 -3.516493936 0.428131087 -1.77372516 -0.953738271 177 -3.291809075 -0.046883792 1.46610037 1.873553251 178 -3.902405860 -0.463235331 -8.71667729 0.254021973 179 -2.804428472 -0.227196792 -5.76794237 1.156959405 180 -0.308468359 0.330831183 -0.50162236 1.625404491 181 -0.487776843 0.835954868 -2.85337020 3.745119767 182 -2.642103370 -0.516608031 0.82481861 1.544461403 183 -0.126042425 0.060216470 -0.58228755 3.010624894 184 -3.337303478 -0.142068036 2.35828880 0.111017969 185 -1.882981587 0.302058828 -2.00924315 2.671977452 186 -1.215988638 0.167136372 3.25635043 5.749962029 187 -2.027460409 0.191422962 1.94217993 5.429001890 188 -0.251665557 0.347474756 -0.38926667 -0.903320691 189 -2.900879848 -0.147564346 0.66775804 2.330539618 190 -2.436131867 0.072904555 2.59215223 0.284852682 191 -2.352730295 0.337968481 2.46892796 0.284915804 192 -3.950444136 -0.179232797 -0.76617184 0.884786816 193 -0.747118890 0.376138168 2.89754838 -0.899000180 194 -1.233315052 -0.574313391 -0.29141828 6.701801495 195 -2.678878930 0.117611031 0.79958290 -0.288006543 196 -3.125997242 0.268806874 -3.52992416 -1.243703106 197 -0.191525693 0.052715558 -0.41487103 1.736271056 198 -2.417337694 -0.191079862 -2.98798767 0.052780046 199 -1.617237579 0.806033845 -0.53120202 1.277246270 200 -0.358109418 0.365504112 1.25174268 -0.543749500 201 0.362178499 0.266865343 0.12514647 1.791489700 202 -1.432837625 0.675356540 3.49235825 -0.538673685 > > > > cleanEx(); ..nameEx <- "dr.permutation.test" > > ### * dr.permutation.test > > flush(stderr()); flush(stdout()) > > ### Name: dr.permutation.test > ### Title: Dimension Reduction Regression Functions > ### Aliases: dr.permutation.test dr.permutation.test.statistic > ### dr.permutation.test.statistic.default > ### dr.permutation.test.statistic.phd > ### dr.permutation.test.statistic.phdres > ### dr.permutation.test.statistic.phdy print.dr.permutation.test > ### summary.dr.permutation.test > ### Keywords: regression > > ### ** Examples > > data(ais) > attach(ais) # the Australian athletes data > #fit dimension reduction regression using sir > m1 <- dr(LBM~Wt+Ht+RCC+WCC, method="sir", nslices = 8) > summary(m1) Call: dr(formula = LBM ~ Wt + Ht + RCC + WCC, method = "sir", nslices = 8) Method: sir with 8 slices, n = 202, using weights. Slice Sizes: 26 26 25 25 25 27 30 18 Eigenvectors: Dir1 Dir2 Dir3 Dir4 Wt -0.11361 -0.019915 -0.24571 -0.02852 Ht -0.05112 0.001870 0.42387 0.01375 RCC -0.99108 0.999192 -0.86952 0.22637 WCC 0.04742 -0.034861 0.06249 0.97353 Dir1 Dir2 Dir3 Dir4 Eigenvalues 0.8774 0.1501 0.03948 0.01741 R^2(OLS|dr) 0.9986 0.9986 0.99977 1.00000 Asymp. Chi-square tests for dimension: Stat df p-value 0D vs >= 1D 219.041 28 0.000000 1D vs >= 2D 41.816 18 0.001173 2D vs >= 3D 11.492 10 0.320513 3D vs >= 4D 3.517 4 0.475320 > dr.permutation.test(m1,npermute=100) Permutation tests Number of permutations: [1] 100 Test results: Stat p-value 0D vs >= 1D 219.041 0.0000 1D vs >= 2D 41.816 0.0000 2D vs >= 3D 11.492 0.3366 3D vs >= 4D 3.517 0.4653 > plot(m1) > dr.coplot(m1) > > > > cleanEx(); ..nameEx <- "dr.weights" > > ### * dr.weights > > flush(stderr()); flush(stdout()) > > ### Name: dr.weights > ### Title: Estimate weighting for elliptical symmetry > ### Aliases: dr.weights robust.center.scale > ### Keywords: regression > > ### ** Examples > > data(ais) > w1 <- dr.weights(~ Ht +Wt +RCC, data = ais) Loading required package: MASS > m1 <- dr(LBM~Ht+Wt+RCC,data=ais,weights=w1) > > > > cleanEx(); ..nameEx <- "dr.x" > > ### * dr.x > > flush(stderr()); flush(stdout()) > > ### Name: dr.x > ### Title: Accessor functions for dr. objects > ### Aliases: dr.x dr.wts dr.qr dr.Q dr.R dr.z dr.y.name > ### Keywords: internal > > ### ** Examples > > ##---- Should be DIRECTLY executable !! ---- > ##-- ==> Define data, use random, > ##-- or do help(data=index) for the standard data sets. > > ## The function is currently defined as > function(object) {object$x} function (object) { object$x } > > > > cleanEx(); ..nameEx <- "dr.y" > > ### * dr.y > > flush(stderr()); flush(stdout()) > > ### Name: dr.y > ### Title: ~~function to do ... ~~ > ### Aliases: dr.y dr.y.default dr.y.phd dr.y.phdres dr.y.phdy dr.y.phdq > ### Keywords: internal > > ### ** Examples > > ##---- Should be DIRECTLY executable !! ---- > ##-- ==> Define data, use random, > ##-- or do help(data=index) for the standard data sets. > > ## The function is currently defined as > function(object) {UseMethod("dr.y")} function (object) { UseMethod("dr.y") } > > > > cleanEx(); ..nameEx <- "givens.rotation" > > ### * givens.rotation > > flush(stderr()); flush(stdout()) > > ### Name: givens.rotation > ### Title: Create givens rotation matrix > ### Aliases: givens.rotation > ### Keywords: regression > > ### ** Examples > > givens.rotation(1,4,c(1,3)) [,1] [,2] [,3] [,4] [1,] 0.5403023 0 0.8414710 0 [2,] 0.0000000 0 0.0000000 0 [3,] -0.8414710 0 0.5403023 0 [4,] 0.0000000 0 0.0000000 0 > > > > cleanEx(); ..nameEx <- "markby" > > ### * markby > > flush(stderr()); flush(stdout()) > > ### Name: markby > ### Title: Produce a vector of colors/symbols to mark points > ### Aliases: markby > ### Keywords: regression > > ### ** Examples > > x <- rnorm(100) > y <- rnorm(100) > z <- cut(rnorm(100),3) > # Scatterplot, mark using color with groups determined by Status > plot(x,y,col=markby(z)) > # Scatterplot, mark using symbols with groups determined by Status > plot(x,y,pch=markby(z,use="symbols")) > # handing of missing values: > z[1:10] <- NA # set to missing > marks <- markby(z,na.action="omit") > sel <- !is.na(marks) > plot(x[sel],y[sel],col=marks[sel]) > > > > cleanEx(); ..nameEx <- "rotplot" > > ### * rotplot > > flush(stderr()); flush(stdout()) > > ### Name: rotplot > ### Title: draw many 2D projections of a 3D plot > ### Aliases: rotplot > ### Keywords: regression > > ### ** Examples > > data(ais) > attach(ais) > m1 <- dr(LBM ~ Ht + Wt + WCC) > rotplot(dr.direction(m1,which=1:2),dr.y(m1),col=markby(Sex)) Warning in data.row.names(row.names, rowsi, i) : some row.names duplicated: 203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445, > > > > ### *