What is the best way to add vars to linear model if they depends one fo the other in R?

sop

I have a data that has 3 variables that depend one of the other, like a hierarchy, so supposing that the data look like this:

 H0   H1   H2   t   y   x
 a    a1   a1a  5   2   1
 a    a1   a1b  5   4   2
 a    a2   a2a  8   3   3
 b    b1   b1a  22  7   88
 c    a1   c1a  2   2   2
 ...

As it can be seen, there is a hierarchy: H0->H1->H2. And there maybe the same H1 for two different H0. I want to make a linear model for x depending on the other variables:

model <- lm(log(x) ~ H0 + H1 + H2 + t + y)

This has worked, but if I change it with H0*H1 + H2 + t + y I get an not enough memory error. And if I do H0 + H1 + H0:H1 + H2 + t + y I get the same error with the same estimated needed size (that I assume is correct).

I have seen also that there is also nesting / and conditioning | (docs), and I am not really sure which is the best for my case. I have found here that

| isn't used by lm at all

which I am afraid to agree, but no conter arguments. And there are also as is I(...) and also ^, and I really want some more explanations about these approaches.

More: supposing that I have another variable q, that I do not use in the model shall I use -q in lm?

YCR

The - operator removes the specified terms, so that (a+b+c)^2 - a:b is identical to a + b + c + b:c + a:c.

It could also be used to delete the intercept term.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

What is the SQL query in Access to replace all column values with one of it's values, which depends on values of other attributes?

분류에서Dev

what is the BEST way to populate several tables with different data on one view?

분류에서Dev

What is the best way to have output of multiple commands in one console?

분류에서Dev

What's the best way to call a php method in zend model using javascript/jQuery

분류에서Dev

What is the best way to uninstall nginx

분류에서Dev

What is the best way of doing multithreading?

분류에서Dev

What's the best way to sort?

분류에서Dev

What's the best way to make a program update from a new PPA (when an old one is no longer maintained)?

분류에서Dev

In TCL what is the best way to add 2 very long string formatted hex numbers?

분류에서Dev

Best way to model millions of exist checks in Aerospike?

분류에서Dev

Best relation between one and three other tables

분류에서Dev

What is the best way to do custom sort?

분류에서Dev

What is the best way to partition your drive?

분류에서Dev

What is the best way to create RAID 1?

분류에서Dev

What is the best way of making webservice secure

분류에서Dev

What is the best way of managin my JAR API

분류에서Dev

What is the best way of making webservice secure

분류에서Dev

What is the best way to sort an array of TIME in JAVA

분류에서Dev

What's the best way to list size of / in Terminal?

분류에서Dev

What is the best way to track the state of an Isolate in Dart?

분류에서Dev

What is the best way to decorate methods of a Python class?

분류에서Dev

What is the best way to restrict access to adult content?

분류에서Dev

Android what's the best way to hide logs?

분류에서Dev

What is the best way of creating tables in MySQL?

분류에서Dev

What is the best way to create a viewController of iPad?

분류에서Dev

How to add new column depends on row value in R?

분류에서Dev

Best way to Duplicate a Laptop's Hard Drive One-to-One

분류에서Dev

link two j spinners where number range of one depends on value selected in the other

분류에서Dev

Best way to count unique element in a string in r

Related 관련 기사

  1. 1

    What is the SQL query in Access to replace all column values with one of it's values, which depends on values of other attributes?

  2. 2

    what is the BEST way to populate several tables with different data on one view?

  3. 3

    What is the best way to have output of multiple commands in one console?

  4. 4

    What's the best way to call a php method in zend model using javascript/jQuery

  5. 5

    What is the best way to uninstall nginx

  6. 6

    What is the best way of doing multithreading?

  7. 7

    What's the best way to sort?

  8. 8

    What's the best way to make a program update from a new PPA (when an old one is no longer maintained)?

  9. 9

    In TCL what is the best way to add 2 very long string formatted hex numbers?

  10. 10

    Best way to model millions of exist checks in Aerospike?

  11. 11

    Best relation between one and three other tables

  12. 12

    What is the best way to do custom sort?

  13. 13

    What is the best way to partition your drive?

  14. 14

    What is the best way to create RAID 1?

  15. 15

    What is the best way of making webservice secure

  16. 16

    What is the best way of managin my JAR API

  17. 17

    What is the best way of making webservice secure

  18. 18

    What is the best way to sort an array of TIME in JAVA

  19. 19

    What's the best way to list size of / in Terminal?

  20. 20

    What is the best way to track the state of an Isolate in Dart?

  21. 21

    What is the best way to decorate methods of a Python class?

  22. 22

    What is the best way to restrict access to adult content?

  23. 23

    Android what's the best way to hide logs?

  24. 24

    What is the best way of creating tables in MySQL?

  25. 25

    What is the best way to create a viewController of iPad?

  26. 26

    How to add new column depends on row value in R?

  27. 27

    Best way to Duplicate a Laptop's Hard Drive One-to-One

  28. 28

    link two j spinners where number range of one depends on value selected in the other

  29. 29

    Best way to count unique element in a string in r

뜨겁다태그

보관