R语言解多元线性方程R语言中输入test之后,数据如下:>testx1 x2 y1 30.0 760.0 114.52 15.0 901.5 77.03 15.0 698.0 59.54 16.0 595.0 54.05 47.8 589.0 135.0然后输入:> Im.test=Im(test$y~test$x1+test$x2)Error in Im(test$y test$x1 + t

来源:学生作业帮助网 编辑:作业帮 时间:2024/09/08 06:24:00
R语言解多元线性方程R语言中输入test之后,数据如下:>testx1 x2 y1 30.0 760.0 114.52 15.0 901.5 77.03 15.0 698.0 59.54 16.0 595.0 54.05 47.8 589.0 135.0然后输入:> Im.test=Im(test$y~test$x1+test$x2)Error in Im(test$y test$x1 + t
xMOAǿs]`yizC5$2uMb6I QbEi҆3| f =.uUTp K~f CPP ,K2Ģ|T@QYIXLîM٨&$5JT\V#B$&A'"a&;k{#e$۹$' b+zYX4ڼ|` <"#P}p#$T?&!=ej/ʢY җY 0t }'[Q}xXVU{ON0^c۸IWW2ub>nH{*fѥ3V[/gQ+GZ˨uŇ mnܳ,휟>(z4[`֝2~'GzՂJ?!

R语言解多元线性方程R语言中输入test之后,数据如下:>testx1 x2 y1 30.0 760.0 114.52 15.0 901.5 77.03 15.0 698.0 59.54 16.0 595.0 54.05 47.8 589.0 135.0然后输入:> Im.test=Im(test$y~test$x1+test$x2)Error in Im(test$y test$x1 + t
R语言解多元线性方程
R语言中输入test之后,数据如下:
>test
x1 x2 y
1 30.0 760.0 114.5
2 15.0 901.5 77.0
3 15.0 698.0 59.5
4 16.0 595.0 54.0
5 47.8 589.0 135.0
然后输入:
> Im.test=Im(test$y~test$x1+test$x2)
Error in Im(test$y test$x1 + test$x2) :
non-numeric argument to function
这报错了,应该怎么处理啊?

R语言解多元线性方程R语言中输入test之后,数据如下:>testx1 x2 y1 30.0 760.0 114.52 15.0 901.5 77.03 15.0 698.0 59.54 16.0 595.0 54.05 47.8 589.0 135.0然后输入:> Im.test=Im(test$y~test$x1+test$x2)Error in Im(test$y test$x1 + t
你先试试这样
lm.test=lm(y~x1+x2,test)
根据你的报错:non-numeric argument to function
就是说你的数据里面有非数字型的,可能是NA,可能是字符“n/a” 仔细排查一下吧