[R] [FORGED] Regression with factors ?

Rolf Turner r.turner at auckland.ac.nz
Sun Jul 10 01:59:30 CEST 2016


On 09/07/16 20:52, stn021 wrote:
> 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 ?


This question makes about as little sense as it is possible to imagine.

cheers,

Rolf Turner

-- 
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276



More information about the R-help mailing list