Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 警告:忽略非列表对比参数_R_Lme4_Nlme_Mgcv_Model.matrix - Fatal编程技术网

R 警告:忽略非列表对比参数

R 警告:忽略非列表对比参数,r,lme4,nlme,mgcv,model.matrix,R,Lme4,Nlme,Mgcv,Model.matrix,我使用R中的“mgcv”包运行gamm: additive.model.saturated <- gamm(log.titer ~ condition + Age_month_selective + Season.2 + s(capture.month, bs = "cc", k = 12) + s(capture.yea

我使用R中的“mgcv”包运行gamm:

additive.model.saturated <- gamm(log.titer ~ condition + 
                            Age_month_selective + Season.2 +
                            s(capture.month, bs = "cc", k = 12) +
                            s(capture.year, bs = "ps", k = 5),
                            random=list(Animal.ID=~1), data = data)
以下是数据的摘要和子集:

#summary:
'data.frame':   1263 obs. of  6 variables:
 $ log.titer          : num  0 0 0 0 0 ...
 $ condition          : num  5 3.5 3.75 3.25 4 3.5 3.25 2.5 3.25 2.75 ...
 $ Age_month_selective: int  39 57 63 68 75 83 27 44 39 51 ...
 $ Season.2           : Factor w/ 2 levels "dry","wet": 1 2 1 2 1 2 1 2 1 1 ...
 $ capture.month      : int  6 12 6 11 6 2 6 11 6 6 ...
 $ capture.year       : int  2008 2009 2010 2010 2011 2012 2008 2009 2009 2010 ...

#data subset
   log.titer condition Age_month_selective Season.2 capture.month capture.year Animal.ID
1   0.000000      5.00                  39      dry             6         2008        B1
2   0.000000      3.50                  57      wet            12         2009        B1
3   0.000000      3.75                  63      dry             6         2010        B1
4   0.000000      3.25                  68      wet            11         2010        B1
5   0.000000      4.00                  75      dry             6         2011        B1
6   1.447158      3.50                  83      wet             2         2012        B1
7   1.334454      3.25                  27      dry             6         2008       B10
8   0.000000      2.50                  44      wet            11         2009       B10
9   0.000000      3.25                  39      dry             6         2009       B10
10  0.000000      2.75                  51      dry             6         2010       B10
11  0.000000      2.50                  56      wet            11         2010       B10
12  0.000000      2.00                  63      dry             6         2011       B10
13  0.000000      2.50                  71      wet             2         2012       B10
14  0.000000      4.50                  63      dry             6         2008       B11
15  1.363612      3.75                  80      wet            11         2009       B11
16  1.365488      4.75                  76      dry             7         2009       B11
17  0.000000      3.75                  87      dry             6         2010       B11
18  0.000000      4.00                  95      wet             2         2011       B11
19  1.447158      3.25                  99      dry             6         2011       B11
20  0.000000      4.75                  51      dry             6         2008       B12
21  0.000000      4.25                  68      wet            11         2009       B12
22  0.000000      4.25                  68      wet            11         2009       B12
23  0.000000      3.50                  75      dry             6         2010       B12
24  0.000000      3.75                  80      wet            11         2010       B12
25  1.414973      2.00                  92      wet            11         2011       B12

这很可能是由您的数据引起的<代码>打印输出对诊断没有帮助。您应该提供
dput(数据)
或至少
str(数据)
的输出。可能会有帮助
#summary:
'data.frame':   1263 obs. of  6 variables:
 $ log.titer          : num  0 0 0 0 0 ...
 $ condition          : num  5 3.5 3.75 3.25 4 3.5 3.25 2.5 3.25 2.75 ...
 $ Age_month_selective: int  39 57 63 68 75 83 27 44 39 51 ...
 $ Season.2           : Factor w/ 2 levels "dry","wet": 1 2 1 2 1 2 1 2 1 1 ...
 $ capture.month      : int  6 12 6 11 6 2 6 11 6 6 ...
 $ capture.year       : int  2008 2009 2010 2010 2011 2012 2008 2009 2009 2010 ...

#data subset
   log.titer condition Age_month_selective Season.2 capture.month capture.year Animal.ID
1   0.000000      5.00                  39      dry             6         2008        B1
2   0.000000      3.50                  57      wet            12         2009        B1
3   0.000000      3.75                  63      dry             6         2010        B1
4   0.000000      3.25                  68      wet            11         2010        B1
5   0.000000      4.00                  75      dry             6         2011        B1
6   1.447158      3.50                  83      wet             2         2012        B1
7   1.334454      3.25                  27      dry             6         2008       B10
8   0.000000      2.50                  44      wet            11         2009       B10
9   0.000000      3.25                  39      dry             6         2009       B10
10  0.000000      2.75                  51      dry             6         2010       B10
11  0.000000      2.50                  56      wet            11         2010       B10
12  0.000000      2.00                  63      dry             6         2011       B10
13  0.000000      2.50                  71      wet             2         2012       B10
14  0.000000      4.50                  63      dry             6         2008       B11
15  1.363612      3.75                  80      wet            11         2009       B11
16  1.365488      4.75                  76      dry             7         2009       B11
17  0.000000      3.75                  87      dry             6         2010       B11
18  0.000000      4.00                  95      wet             2         2011       B11
19  1.447158      3.25                  99      dry             6         2011       B11
20  0.000000      4.75                  51      dry             6         2008       B12
21  0.000000      4.25                  68      wet            11         2009       B12
22  0.000000      4.25                  68      wet            11         2009       B12
23  0.000000      3.50                  75      dry             6         2010       B12
24  0.000000      3.75                  80      wet            11         2010       B12
25  1.414973      2.00                  92      wet            11         2011       B12