[R] regression and lmer

Mike Marchywka marchywka at hotmail.com
Mon Apr 18 14:14:16 CEST 2011








----------------------------------------
Date: Mon, 18 Apr 2011 03:27:40 -0700
From: lamprianou at yahoo.com
To: r-help at r-project.org
Subject: Re: [R] regression and lmer


Dear all,

I hope this is the right place to ask this question.
 
( hotmail not marking your text sorry I can';t find option to change that  )
opinions vary but mods seem to let this by and personally it
seems appropriate to discuss general questions about what R 
can do. 

( end my text ) 

I am reviewing a research where the analyst(s) are using a linear
regression model. The dependent variable (DV) is a continuous measure.
The independent variables (IVs) are a mixture of linear and categorical
variables.

( my text ) 

No one wants to do homework or do your job for free but open
free peer review should not be a problem philosophically. 

( / my text, afraid to use less-than for inciting hotmail ) 


The
author investigates whether performance (DV - continuous linear) is a
function of age (continuous IV1 - measured in years), previous
performance (continuous IV2), country (categorical IV3 - six countries), the percentage of PhD graduates in each country (continuous IV4 -
country level data - apparently only six different percentages since we
have only six countries) and population of country (continuous IV5 - country level data - again only six numbers here, one for each country population).

My own opinion is that the lm function cannot be used with country
level data as IVs (for example IV4 and IV5 cannot be entered into the
model because they are country level data). If IV4 and IV5 are included
in the model, it is possible that the model will not be able to be
defined because we only have six countries and it is very likely that
the levels of counties (IV3) may be confounding with IV4 and IV5. This
also calls for multicollinearity issues, right? I would like to suggest
to the analyst to use lmer using the IV3 as a random variable and  IV4
and IV5 as IV at the second level of the two-level model.


The questions are: (a) Is it true that IV4 and IV5 cannot be entered in a
one-level regression if we also have IV3?, (b) can I use an lm function to check for multicollinearity
between IV3, IV4 and IV5?  and (c) If we use a two-level regression
model, does lmer cope well with only six coutnries as a random effect?

( my txt)

So you have presumably a large number of test subjects per country and a small number
( n~6 ) of countries. You could ask a number of questions such as, " do the mean performances
change from country to country by more than that expected given the observed distributions of
performances within country?" You could also ask a question like, " if I try to describe performance
as a function of country attriubte what fitting parameters minimize an error between fit and observation?"
Apparently author tried to write an expression like 

average_performance= a[country_index] + m1*some_attribute_of_country + m2* some_other_attribute_of_country + b

and then expected the fittring algoright to pick a[i], b,m1, and m2 in such a way as to minimize
the resulting error. The reported fits hopefully minimize the error function but then you need
to exmaine the second derivative in various directions, so you have to ask how the error varies
as you change a[i],b,m1, and m2. ( Ignore b right now and assume it s included in a[i]). 
I guess if you can find a direction where the error can not change due to these contraints then
it would seem to be impossible for the fit to come up with unique values. If you change
each a[i] and m1 by some amounts, for example, can you pick those amounts to not change anything? 



( /my text ) 



Thank you for your help

Jason
        [[alternative HTML version deleted]]


______________________________________________
R-help at 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.
 		 	   		  


More information about the R-help mailing list