Re: [R] [FORGED] Regression with factors ?

2016-07-16 Thread stn021
2016-07-13 20:09 GMT+02:00 Jeff Newmiller : > The formula interface as used in lm and nls searches for separate > coefficients for each variable.. it will take someone more clever than I to > figure out how to get the formula interface to think of two variables as >

Re: [R] [FORGED] Regression with factors ?

2016-07-13 Thread Jeff Newmiller
The formula interface as used in lm and nls searches for separate coefficients for each variable.. it will take someone more clever than I to figure out how to get the formula interface to think of two variables as instances of one factor. However, R can do nonlinear optimization just fine:

Re: [R] [FORGED] Regression with factors ?

2016-07-13 Thread David Winsemius
> On Jul 13, 2016, at 8:01 AM, David Winsemius wrote: > > >> On Jul 13, 2016, at 6:48 AM, stn021 wrote: >> >> Hello, >> >> so here a numerical example in R-code. Code is appended below. >> >> The output should be >> 1) the numerical values of the

Re: [R] [FORGED] Regression with factors ?

2016-07-13 Thread stn021
> Is this what is intended? > >> observed_data$p1ab <- persons$ability[ match(observed_data$p1, persons$name) >> ] >> observed_data$p2ab <- persons$ability[ match(observed_data$p2, persons$name) >> ] Hello David, thank you for your answer. The code in my previous post was intended as an

Re: [R] [FORGED] Regression with factors ?

2016-07-13 Thread David Winsemius
> On Jul 13, 2016, at 6:48 AM, stn021 wrote: > > Hello, > > so here a numerical example in R-code. Code is appended below. > > The output should be > 1) the numerical values of the abilities of the persons > 2) the multiplyer > > > Please note that > > 1) I have used

Re: [R] [FORGED] Regression with factors ?

2016-07-13 Thread stn021
Hello, so here a numerical example in R-code. Code is appended below. The output should be 1) the numerical values of the abilities of the persons 2) the multiplyer Please note that 1) I have used non-linear optimization to solve this problem and got the expected result, though not with R but

Re: [R] [FORGED] Regression with factors ?

2016-07-11 Thread Jeff Newmiller
Your clarification is promising. A reproducible example is always preferred, though never a guarantee. I expect to be somewhat preoccupied this week so responses may be rather delayed, but the less setup we have to the more likely that someone on the list will tackle it. Re an answer: If you

Re: [R] [FORGED] Regression with factors ?

2016-07-11 Thread David Winsemius
> On Jul 11, 2016, at 7:28 AM, stn021 wrote: > > Hello, > > thank you for the replies. Sorry about the html-email, I forgot. > Should be OK with this email. > > > Don't be fooled be the apparent simplicity of the problem. I have > tried to reduce it to only a single

Re: [R] [FORGED] Regression with factors ?

2016-07-11 Thread stn021
Hello, thank you for the replies. Sorry about the html-email, I forgot. Should be OK with this email. Don't be fooled be the apparent simplicity of the problem. I have tried to reduce it to only a single relatively simple question. The idea here is to model cooperation of two persons. The

Re: [R] [FORGED] Regression with factors ?

2016-07-09 Thread Jeff Newmiller
I have seen less sensical questions. It would be nice if the example were a bit more complete (as in it should have excess degrees of freedom and an answer) and less like a homework problem (which are off topic here). It would of course also be helpful if the OP were to conform to the Posting

Re: [R] [FORGED] Regression with factors ?

2016-07-09 Thread Rolf Turner
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