Hi,
Try:
Please use ?dput() to show the example dataset:
dat <- structure(list(ID = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), Y = c(555L,
345L, 456L, 552L, 342L, 452L, 555L, 345L, 456L, 552L, 342L, 452L,
562L, 352L, 463L, 582L, 342L, 483
, October 14, 2013 7:47 AM
To: r-help@r-project.org
Subject: [R] repeat a linear regression model
Hello,
I'd like to repeat a linear regression model for groups of rows that are
identified by an ID number.
My table is like this:
ID Y X1 X2 X3 X4
1 555 111
Hello,
I'd like to repeat a linear regression model for groups of rows that are
identified by an ID number.
My table is like this:
ID Y X1 X2 X3 X4
1 555 111 222 333 456
1 345 234 445 543 33
1 456 353 453 456
3 matches
Mail list logo