Dear Michael and list,

R in general tries hard to prohibit this behavior (i.e., including an 
interaction but not the main effect). When removing a main effect and leaving 
the interaction, the number of parameters is not reduced by one (as would be 
expected) but stays the same, at least when using model.matrix:

d <- data.frame(A = rep(c("a1", "a2"), each = 50), B = c("b1", "b2"), value = 
rnorm(10))
ncol(model.matrix(~ A*B, data = d))
#  [1] 4
ncol(model.matrix(~ A*B - A, data = d))
#  [1] 4

I actually don't know understand how R parametrizes the model in the second 
case, but I am pretty sure someone here might do so and be able to explain.

I have asked a question on how to get around this "limitation" on stackoverflow 
with helpful answers by Ben Bolker and Joshua Wiley: 
http://stackoverflow.com/q/11335923/289572
(this functionality is now used in function mixed() in my new package afex for obtaining 
"type 3" p-values for mixed models)

Cheers,
Henrik

Am 10.08.2012 15:48, schrieb R. Michael Weylandt:
On Fri, Aug 10, 2012 at 7:36 AM, ONKELINX, Thierry
<thierry.onkel...@inbo.be> wrote:
Dear Johan,

Why should it be complicated? You have a very simple model, thus a very simple 
formula. Isn't that great?

Your formula matches the model. Though Trust~Culture + Structure * 
Speed_of_Integration is another option. The model fit is the same, the only 
difference is the parameterization of the model.

Note quite, I don't think: A*B is shorthand for A + B + A:B where A:B
is the 2nd order (interaction) term. The OP only had the 2nd order
term without the main effects.

OP: You almost certainly want A*B -- it's strange (though certainly
not impossible) to have good models where you only have interactions
but not main effects.

Cheers,
Michael



Best regards,

Thierry

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and 
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51
+ 32 54 43 61 85
thierry.onkel...@inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more than 
asking him to perform a post-mortem examination: he may be able to say what the 
experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure 
that a reasonable answer can be extracted from a given body of data.
~ John Tukey


-----Oorspronkelijk bericht-----
Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens 
Johan Haasnoot
Verzonden: vrijdag 10 augustus 2012 9:15
Aan: r-help@r-project.org
Onderwerp: [R] Simple question about formulae in R!?

Good morning reader,



I have encountered a, probably, simple issue with respect to the *formulae* of 
a *regression model* I want to use in my research. I'm researching alliances as 
part of my study Business Economics (focus Strategy) at the Vrije Universiteit 
in Amsterdam. In the research model I use a moderating variable, I'm looking 
for confirmation or help on the formulation of the model.



The research model consist of 2 explanatory variables, a moderating variable 
and 1 response variable. The first explanatory variable is Culture, measured on 
a nominal scale and the second is Structure of the alliance, also measured on a 
nominal scale. The moderating variable in the relation towards Trust is Speed 
of Integration, measured as an interval.
The response variable is Trust, measured on a nominal scale (highly likely a 
5-point Likert scale). Given the research model and the measurement scales, I 
intent to use a ordered probit model, often used in Marketing models,  to 
execute the regression modelling. I can't seem to find confirmation on how to 
model the formulae. I have been reading and studying R! for a couple of weeks 
now, read a lot of books from the R! series in the past, but I can't get a 
grasp on this seemingly simple formulae. I think I understand how to model 
multinomial regression (using the R-package MNP), how to execute a Principal 
Components Analysis and an Explanatory Factor analysis (obviously I'm using a 
questionnaire to collect my data), but the formulae itself seems to be to 
simple.



I expect to use the interaction symbol: "Trust~Culture + Structure :
Speed_of_Integration" for the formulae, but is it really this simple? Can 
anybody confirm this or help me, advise me on this issue?


Kind regards,

--

Met vriendelijke groet,

Johan Haasnoot

De Haan & Martojo
Kerklaan 5
3645 ES Vinkeveen
Telefoon: 0297-266354
Mobiel: 06-81827665
Email: johan.haasn...@dh-m.nl
Website: www.dehaanenmartojo.nl

         [[alternative HTML version deleted]]

* * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en 
binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is 
door een geldig ondertekend document.
The views expressed in this message and any annex are purely those of the 
writer and may not be regarded as stating an official position of INBO, as long 
as the message is not confirmed by a duly signed document.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


--
Dipl. Psych. Henrik Singmann
PhD Student
Albert-Ludwigs-Universität Freiburg, Germany
http://www.psychologie.uni-freiburg.de/Members/singmann

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to