[R] Regression with factors ?

stn021 stn021 at gmail.com
Sat Jul 9 10:52:51 CEST 2016


Hello,

I would like to analyse a model like this:

y = 1 *  ( 1 - ( x1 - x2 )  ^ 2   )

x1 and x2 are not continuous variables but factors, so the observation
contain the level.
Its numerical value is unknown and is to be estimated with the model.


The observations look like this:

y        x1     x2
0.96  Alice  Bob
0.84  Alice  Charlie
0.96  Bob   Charlie
0.64  Dave Alice
etc.

Each person has a numerical value. Here for example Alice = 0.2 and Bob =
0.4

Then y = 0.96 = 1* ( 1- ( 0.2-0.4 ) ^ 2 ) , see first observation.

How can this be done in R ?

THX , stn

	[[alternative HTML version deleted]]



More information about the R-help mailing list