car (an R package) means Companion to Applied Regression. Use with the [r] tag
Questions tagged [r-car]
86 questions
2
votes
1 answer
R Variance Inflation Factors - Warning : No function found corresponding to methods exports from ‘SparseM’ for: ‘coerce’
I am playing around with the car library for R and have encountered the following warning after calling the variance_inflation_factors function on my data model.
No function found corresponding to methods exports from ‘SparseM’ for:
…

FinnM
- 394
- 1
- 3
- 17
2
votes
1 answer
Recode in Car package returns unexpected symbol when recoding strings
I have run into a recurring issue when using the car package recode function. If I recreate a publicly used example (http://susanejohnston.wordpress.com/2012/07/18/find-and-replace-in-r-part-1-recode-in-the-library-car/)
and do:
y <-…

MattT
- 99
- 4
2
votes
1 answer
xtable for MANOVA object obtained with car package
I wonder how to get xtable of MANOVA object obtained with car package. Here is MWE:
library(xtable)
library(car)
MANOVA <- Anova(lm(cbind(Al, Fe, Mg, Ca, Na) ~ Site, data=Pottery))
xtable(MANOVA)
Error in UseMethod("xtable") : no applicable…

MYaseen208
- 22,666
- 37
- 165
- 309
1
vote
1 answer
R: Error in vif.default(m) : model contains fewer than 2 terms
When I fit a polynomial regression model in R, if I use the function poly() and then try to get the variance inflation factors using vif() I get the following error:
y = c(0.22200,0.39500,0.42200,0.43700,0.42800,0.46700,0.44400,0.37800,0.49400,
…

s5s
- 11,159
- 21
- 74
- 121
1
vote
2 answers
Looking for a post hoc for a type 2 Anova (mixed-effects model)
My question is how do I run a post hoc on a type 2 Anova (mixed-effects model)? So far I am using the glmer() from the "lme4" package, the Anova() from the "car" package, and trying to run a HSD test from the "agricolae" package.
After searching…

Maria
- 39
- 1
- 10
1
vote
1 answer
Combining scatterplots
I am trying to combine multiple (four) scatter plots into one figure (but not a scatterplot matrix). I am making the individual scatter plots with the scatterplot() function of the car package. I used to be able to combine the four plots using…

Pseudotriton
- 13
- 4
1
vote
1 answer
R: customised function for VIF
I am trying to write a loop to calculate Variance Inflation Factor. I understand there are functions and packages that can do this for me but I need some sort of customisation.
A sample data
library(MASS)
library(clusterGeneration)
…

89_Simple
- 3,393
- 3
- 39
- 94
1
vote
0 answers
R car package - extract residuals for 2 way anova with repeated factors
I am using the car package to do a two way anova with repeated measures in R. More specifically I'm using the function Anova() (note the capital A). This seems to be working fine but I want to test if the residuals are normal. However, I can't find…

JaneDoe
- 13
- 3
1
vote
1 answer
scatter3d ellipsoid argument inside shiny R failing
Two steps forward, one step back. The last weeks I've run into a few issues that I could not solve on my own as a self tought user with 1 year experience in R, but fortunatly there are great people on this site that have helped me a lot! First of…

Mark
- 2,789
- 1
- 26
- 66
1
vote
2 answers
Ugly overlapping line (abline) in scatterplot
I have this problem with an ugly looking overlapping regression line when I plot my calculations with scatterplot() in combination with abline():
The bug seems to occur only when the line is cutting the upper frame. Unfortunately it happens with my…

jay.sf
- 60,139
- 8
- 53
- 110
1
vote
0 answers
Using car::Anova package for a doubly-multivariate MANOVA in R
I'm trying to run a repeated-measures MANOVA in R, which also contains a number of dependent variables (key outcome variables of behavioural tasks). The repeated-measures are due to a cross-over design, in which individuals took a drug and placebo…

A.Pike
- 11
- 2
1
vote
1 answer
Calculating Variance Inflation Factors (VIFs) based on object type in R
There seem to be two popular ways of calculating VIFs (Variance Inflation Factors, to detect collinearity among variables in regression) in R:
The vif() function in the car package, where the input is the model. This requires you to first fit a…

Tilen
- 133
- 7
1
vote
1 answer
Fitting Binomial distribution with car package
For fitting several probability distribution for my data set, I try several distributions using car and MASS packages, for example for Poisson distribution:
require(car); require (MASS)
#Data set
X1 <- rnorm(100, 175, 7)
Y1 <- rbinom(100,1,…

Leprechault
- 1,531
- 12
- 28
1
vote
2 answers
how to add x=y line to scatterplot matrix?
I would like to add an x=y-line to the scatterplots of a scatterplotmatrix like the one below:
Does anyone know a function which is able to do this with an easy option?
so far I tried pairs and here scatterplotMatrix from car-package and couldn´t…

WeTo
- 31
- 3
1
vote
1 answer
Weird behaviour of the car::boxCox() function when wrap into a homemade function
I'm trying to wrap the car::boxCox function into a homemade function so I can mapply it to a list of datasets. I'm using the boxCox function from the car package and not the MASS package because I want to use the family="yjPower". My problem is…

Bastien
- 3,007
- 20
- 38