[R] Formula for calculating interaction terms in R

2009-11-09 Thread Stephen Montgomery
Hello - I am trying to figure out R's transformation for interaction terms in a linear regression. My simple background understanding is that interaction terms are generally calculated by multiplying the centred (0-mean) variables with each other and then doing the regression. However, in this

[R] Determining variance components of classed covariates

2009-01-12 Thread Stephen Montgomery
Hi - I am interested in solving variance components for the data below with respect to the response variable, Expression within R. However, the covariates aren't independent and they also have a class (of which the total variance explained by covariates in that class I am most interested in).

[R] Calculating p-values from your own distribution as an array

2009-01-09 Thread Stephen Montgomery
Hi - If I have a hypothetical distribution as an array distribution-c(0,1,2,3,4,5,6,7,8,9) and I want to find the probability there is a value smaller than a new value. new_value-4 (such that I'd get this type of output) new_value p-value 4 0.5 3.4 0.4 3 0.4 0