linear.hypothesis {car}R Documentation

Test Linear Hypothesis

Description

Generic function for testing a linear hypothesis, and methods for linear models, generalized linear models, multivariate linear models, and other models that have methods for coef and vcov.

Usage

linear.hypothesis(model, ...)

lht(model, ...)

## Default S3 method:
linear.hypothesis(model, hypothesis.matrix, rhs=NULL, 
    test=c("Chisq", "F"), vcov.=NULL, verbose=FALSE, ...)  

## S3 method for class 'lm':
linear.hypothesis(model, hypothesis.matrix, rhs=NULL,
    test=c("F", "Chisq"), vcov.=NULL, white.adjust=FALSE, ...)

## S3 method for class 'glm':
linear.hypothesis(model,  ...)

## S3 method for class 'mlm':
linear.hypothesis(model, hypothesis.matrix, rhs=NULL, SSPE, V,
    test, idata, icontrasts=c("contr.sum", "contr.poly"), idesign, iterms, 
    P=NULL, title="", verbose=FALSE, ...)
       
## S3 method for class 'linear.hypothesis.mlm':
print(x, SSP=TRUE, SSPE=SSP, 
    digits=unlist(options("digits")), ...) 

Arguments

model fitted model object. The default method works for models for which the estimated parameters can be retrieved by coef and the corresponding estimated covariance matrix by vcov. See the Details for more information.
hypothesis.matrix matrix (or vector) giving linear combinations of coefficients by rows, or a character vector giving the hypothesis in symbolic form (see Details).
rhs right-hand-side vector for hypothesis, with as many entries as rows in the hypothesis matrix; can be omitted, in which case it defaults to a vector of zeroes. For a multivariate linear model, rhs is a matrix, defaulting to 0.
idata an optional data frame giving a factor or factors defining the intra-subject model for multivariate repeated-measures data. See Details for an explanation of the intra-subject design and for further explanation of the other arguments relating to intra-subject factors.
icontrasts names of contrast-generating functions to be applied by default to factors and ordered factors, respectively, in the within-subject ``data''; the contrasts must produce an intra-subject model matrix in which different terms are orthogonal.
idesign a one-sided model formula using the ``data'' in idata and specifying the intra-subject design.
iterms the quoted name of a term, or a vector of quoted names of terms, in the intra-subject design to be tested.
P transformation matrix to be applied to the repeated measures in multivariate repeated-measures data; r>

Canadian Interprovincial Migration Data

Description

The Migration data frame has 90 rows and 8 columns.

Usage

Migration

Format

This data frame contains the following columns:

source
Province of origin (source). A factor with levels: ALTA, Alberta; BC, British Columbia; MAN, Manitoba; NB, New Brunswick; NFLD, New Foundland; NS, Nova Scotia; ONT, Ontario; PEI, Prince Edward Island; QUE, Quebec; SASK, Saskatchewan.
destination
Province of destination (1971 residence). A factor with levels: ALTA, Alberta; BC, British Columbia; MAN, Manitoba; NB, New Brunswick; NFLD, New Foundland; NS, Nova Scotia; ONT, Ontario; PEI, Prince Edward Island; QUE, Quebec; SASK, Saskatchewan.
migrants
Number of migrants (from source to destination) in the period 1966–1971.
distance
Distance (between principal cities of provinces): NFLD, St. John; PEI, Charlottetown; NS, Halifax; NB, Fredricton; QUE, Montreal; ONT, Toronto; MAN, Winnipeg; SASK, Regina; ALTA, Edmonton; BC, Vancouver.
pops66
1966 population of source province.
pops71
1971 population of source province.
popd66
1966 population of destination province.
popd71
1971 population of destination province.

Details

There is one record in the data file for each migration stream. You can average the 1966 and 1971 population figures for each of the source and destination provinces.

Source

Canada (1962) Map. Department of Mines and Technical Surveys.

Canada (1971) Census of Canada. Statistics Canada, Vol. 1, Part 2 [Table 32].

Canada (1972) Canada Year Book. Statistics Canada [p. 1369].

References

Fox, J. (1997) Applied Regression, Linear Models, and Related Methods. Sage.


[Package car version 1.2-8 Index]
./usr/lib/R/site-library/car/html/ceres.plots.html0000644000000000000000000001063611003076505020742 0ustar rootroot R: Ceres Plots
ceres.plots {car}R Documentation

Ceres Plots

Description

These functions calculate Ceres plots for linear and generalized linear model.

Usage

ceres.plots(model, variable, ask=missing(variable), one.page=!ask, 
  span=0.5, ...)

ceres.plot(model, ...)

## S3 method for class 'lm':
ceres.plot(model, variable, line=TRUE, smooth=TRUE, span=0.5, iter,
  las=par('las'), col=palette()[2], pch=1, lwd=2, main="Ceres Plot", ...)

## S3 method for class 'glm':
ceres.plot(model, ...)

Arguments

model model object produced by lm or glm.
variable variable (if it exists in the search path) or name of variable. This argument usually is omitted for ceres.plots.
ask if TRUE, a menu is provided in the R Console for the user to select the variable(s) to plot, and to modify the span for the smoother used to draw a nonparametric-regression line on the plot.
one.page if TRUE (and ask=FALSE), put all plots on one graph.
span span for lowess smoother.
iter number of robustness iterations for nonparametric-regression smooth; defaults to 3 for a linear model and to 0 for a non-Gaussian glm.
line TRUE to plot least-squares line.
smooth TRUE to plot nonparametric-regression (lowess) line.
las if 0, ticks labels are drawn parallel to the axis; set to 1 for horizontal labels (see par).
col color for points and lines; the default is the second entry in the current color palette (see palette and par).
pch plotting character for points; default is 1 (a circle, see par).
lwd line width; default is 2 (see par).
main title for plot.
... pass arguments down.

Details

Ceres plots are a generalization of component+residual (partial residual) plots that are less prone to leakage of nonlinearity among the predictors.

The function intended for direct use is ceres.plots. By default, this function is used interactively through a text menu.

The model cannot contain interactions, but can contain factors. Factors may be present in the model, but Ceres plots cannot be drawn for them.

Value

NULL. These functions are used for their side effect: producing plots.

Author(s)

John Fox jfox@mcmaster.ca

References

Cook, R. D. and Weisberg, S. (1999) Applied Regression, Including Computing and Graphics. Wiley.

Fox, J. (1997) Applied Regression, Linear Models, and Related Methods. Sage.

See Also

cr.plots, av.plots

Examples

  ## Not run: 
ceres.plots(lm(prestige~income+education+type, data=Prestige))
  
## End(Not run)

[Package car version 1.2-8 Index]
./usr/lib/R/site-library/car/html/Robey.html0000644000000000000000000000273411003076504017560 0ustar rootroot R: Fertility and Contraception
Robey {car}R Documentation

Fertility and Contraception

Description

The Robey data frame has 50 rows and 3 columns. The observations are developing nations around 1990.

Usage

Robey

Format

This data frame contains the following columns:

region
A factor with levels: Africa; Asia, Asia and Pacific; Latin.Amer, Latin America and Caribbean; Near.East, Near East and North Africa.
tfr
Total fertility rate (children per woman).
contraceptors
Percent of contraceptors among married women of childbearing age.

Source

Robey, B., Shea, M. A., Rutstein, O. and Morris, L. (1992) The reproductive revolution: New survey findings. Population Reports. Technical Report M-11.

References

Fox, J. (1997) Applied Regression, Linear Models, and Related Methods. Sage.


[Package car version 1.2-8 Index]
./usr/lib/R/site-library/car/html/some.html0000644000000000000000000000335311003076507017444 0ustar rootroot R: Sample a Few Elements of an Object
some {car}R Documentation

Sample a Few Elements of an Object

Description

Randomly select a few elements of an object, typically a data frame, matrix, vector, or list. If the object is a data frame or a matrix, then rows are sampled.

Usage

some(x, ...)

## S3 method for class 'data.frame':
some(x, n=10, ...)

## S3 method for class 'matrix':
some(x, n=10, ...)

## Default S3