lmerp {lmerPerm} | R Documentation |
This function is used for permutation test for general and mixed linear regression
Description
perform general and mixed linear regression by lm function in R base or lmer function in lmer/lmertest package and permutation tests on observed t values of beta coef -ficients
Usage
lmerp(formula, data, thresh, R, mixed, minimum)
Arguments
formula |
Regression formula in the form 'y~x1+x2+x3' for general linear function or 'y~x1+x2+x3+(1|x4)' or 'y~x1+x2+x3+(x3|x4)' for mixed linear function |
data |
A data frame specifying the data to be analysed |
thresh |
Threshold to stop iteration, default value is 0.1 |
R |
The maximum number of iteration, default value is 1000 |
mixed |
A logic value indicates if you desire to perform mixed linear model or not. Default value is FALSE. |
minimum |
The minimum number of iteration, default value is 50 |
Value
A list contains 2 items: Results and T_perm, the former contains results of origi -nal parameter test and results of permutation test including adjusted confident interval (Ci_perm), p values (P_perm), iteration number(Iteration), the later contains a list cont -ains all t values generated in each permutation
Examples
formula<-mpg~cyl
data<-mtcars
my_perm<-lmerp(formula,data)