funnel(f,...)
## S3 method for class 'lm'
funnel(f,...)
## S3 method for class 'formula'
funnel(f, data, subset, weights, na.action, method = "qr",
model = TRUE, x = FALSE, y = FALSE, qr = TRUE, singular.ok = TRUE,
contrasts = NULL, offset, ...)
Arguments
f
an lm object or a model formula
data
A data frame, list or environment containing the variables in the model.
subset
an optional vector specifying a subset of observations to be used in the fitting process.
weights
an optional vector of ‘prior weights’ to be used in the fitting process. Should be NULL or a numeric vector.
na.action
a function which indicates what should happen when the data contain NAs. The default is set by the na.action setting of options, and is na.fail if that is unset. The ‘factory-fresh’ default is na.omit. Another possible value is NULL, no action. Value na.exclude can be useful.
method
the method to be used in fitting the model. The default method "glm.fit" uses iteratively reweighted least squares (IWLS): the alternative "model.frame" returns the model frame and does no fitting.
x, y, qr, model
For glm: logical values indicating whether the response vector and model matrix used in the fitting process should be returned as components of the returned value.
For glm.fit: x is a design matrix of dimension n * p, and y is a vector of observations of length n.
singular.ok
logical. If FALSE (the default in S but not in R) a singular fit is an error.
contrasts
an optional list. See the contrasts.arg of model.matrix.default.
offset
this can be used to specify an a priori known component to be included in the linear predictor during fitting. This should be NULL or a numeric vector of length equal to the number of cases. One or more offset terms can be included in the formula instead or as well, and if more than one is specified their sum is used. See model.offset.
...
additional arguments to be passed to the low level regression fitting functions see lm and glm help files
Value
Prints the slope of the line of best fit for log std.errors vs log means. Returns (invisibly) the estimated variances of the observations, and draws (i) a plot of log standard deviations versus log means, and (ii) a plot of the smoothed squared residuals.
Note
This function redirects to other functions based on the type of object. eg funnel.lm , funnel.formula
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
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 an HTML browser interface to help.
Type 'q()' to quit R.
> library(R330)
Loading required package: s20x
Loading required package: leaps
Loading required package: rgl
Loading required package: lattice
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/R330/funnel.Rd_%03d_medium.png", width=480, height=480)
> ### Name: funnel
> ### Title: Plots for checking for unequal variances
> ### Aliases: funnel funnel.lm funnel.formula
> ### Keywords: aplot
>
> ### ** Examples
>
> data(educ.df)
> educ50.lm = lm(educ~urban + percap + under18, data=educ.df, subset=-50)
> funnel(educ50.lm)
Slope: 1.723989
> #
> funnel(educ~urban + percap + under18, data=educ.df, subset=-50)
Slope: 1.723989
>
>
>
>
>
> dev.off()
null device
1
>