サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
iPhone 16
www.statmethods.net
An excellent review of regression diagnostics is provided in John Fox's aptly named Overview of Regression Diagnostics. Dr. Fox's car package provides advanced utilities for regression modeling. # Assume that we are fitting a multiple linear regression # on the MTCARS data library(car) fit <- lm(mpg~disp+hp+wt+drat, data=mtcars) This example is for exposition only. We will ignore the fact that thi
Reshaping Data R provides a variety of methods for reshaping data prior to analysis. Transpose Use the t() function to transpose a matrix or a data frame. In the later case, rownames become variable (column) names. # example using built-in dataset mtcars t(mtcars) The Reshape Package Hadley Wickham has created a comprehensive package called reshape to massage data. Both an introduction and article
Recursive partitioning is a fundamental tool in data mining. It helps us explore the stucture of a set of data, while developing easy to visualize decision rules for predicting a categorical (classification tree) or continuous (regression tree) outcome. This section briefly describes CART modeling, conditional inference trees, and random forests. CART Modeling via rpart Classification and regressi
You can customize many features of your graphs (fonts, colors, axes, titles) through graphic options. One way is to specify these options in through the par( ) function. If you set parameter values here, the changes will be in effect for the rest of the session or until you change them again. The format is par(optionname=value , optionname= value ,...) # Set a graphical parameter using par() par()
For each of these functions, you enter three of the four quantities (effect size, sample size, significance level, power) and the fourth is calculated. The significance level defaults to 0.05. Therefore, to calculate the significance level, given an effect size, sample size, and power, use the option "sig.level=NULL". Specifying an effect size can be a daunting task. ES formulas and Cohen's sugges
Principal Components and Factor Analysis This section covers principal components and factor analysis. The latter includes both exploratory and confirmatory methods. Principal Components The princomp( ) function produces an unrotated principal component analysis. # Pricipal Components Analysis # entering raw data and extracting PCs # from the correlation matrix fit <- princomp(mydata, cor=TRUE) su
R offers a wide range of functions for cluster analysis, including hierarchical agglomerative, partitioning, and model-based approaches. Although there is no definitive solution for determining the optimal number of clusters to extract, several approaches are available. Data Preparation Prior to clustering data, you may want to remove or estimate missing data and rescale variables for comparabilit
About Quick-R R is an elegant and comprehensive statistical and graphical programming language. Unfortunately, it can also have a steep learning curve. I created this website for both current R users, and experienced users of other statistical packages (e.g., SAS , SPSS , Stata ) who would like to transition to R. My goal is to help you quickly access this language in your work. I assume that you
Histograms and Density Plots Histograms You can create histograms with the function hist(x) where x is a numeric vector of values to be plotted. The option freq=FALSE plots probability densities instead of frequencies. The option breaks= controls the number of bins. # Simple Histogram hist(mtcars$mpg) click to view # Colored Histogram with Different Number of Bins hist(mtcars$mpg, breaks=12, col="
このページを最初にブックマークしてみませんか?
『Quick-R: Home Page』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く