Description Usage Arguments Value Examples
fit a linear model with basic model diagnose
| 1 2 3 4 5 6 7 8 9 10 11 12 | 
| dat | input data frame with no NAs, should include all the data that will be used | 
| response | name string for response | 
| covariates | string vector of the chosen variables in the input data frame | 
| inter | specify the pairwise interaction in regression , e.g.:c('Age*Sex', 'Age*R_E') | 
| category | specify the categorical variables by input the names vector | 
| cat_method | choose the coding method for categorical variables, should be 'reference' or 'cellmeans' | 
| ref | specify the reference level for each categorical variable | 
| model.diag | default is True, activate the model diagnose function | 
| intercept | default is True, make the model with an intercept | 
| cutoff | specify the level of significance for the test | 
similar output table as summary(lm), residuals,R.square, R.square.adj, SSE
| 1 2 3 4 5 6 | data(mydata)
covar2 = c('Fatalism', 'Sex', 'R_E', 'Age_4Cat', 'NIHSS_4Cat')
covar3 = c('Fatalism', 'Sex', 'R_E', 'Age_4Cat')
t4 = mylm(mydata, 'Depression', covar2, category = c('Age_4Cat', 'NIHSS_4Cat'), ref = c(1,1))
t5 = mylm(mydata, 'Depression', covar3, category = c('Age_4Cat'),
cat_method = 'cellmeans', intercept = FALSE)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.