MIPS - Как выполнить сдвиг на строку?

Другой вариант - использовать функцию cor.test вместо lm:

> x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1)
> y <- c( 2.6,  3.1,  2.5,  5.0,  3.6,  4.0,  5.2,  2.8,  3.8)

> mycor = cor.test(x,y)
> mylm = lm(x~y)

# r and rsquared:
> cor.test(x,y)$estimate ** 2
      cor 
0.3262484 
> summary(lm(x~y))$r.squared
[1] 0.3262484

# P.value 

> lmp(lm(x~y))  # Using the lmp function defined in Chase's answer
[1] 0.1081731
> cor.test(x,y)$p.value
[1] 0.1081731
0
задан Kenny Blum 1 March 2019 в 06:50
поделиться

1 ответ

Я понял это! Вот обновленный фрагмент кода, который теперь содержит рабочие инструкции. Я оставлю этот пост на случай, если он кому-нибудь поможет.

.data
     output1: .asciiz "The value in $t1 is: "
.text
     add $t0, $t0, 2   # shifts the string left by 2 bits (CORRECT) 
     li $v0, 4
     la $a0, output1
     syscall           # print "The value in $t1 is: "
     li $v0, 4
     move $a0, $t1
     syscall           # print the contents of the register $t1
0
ответ дан Kenny Blum 1 March 2019 в 06:50
поделиться
Другие вопросы по тегам:

Похожие вопросы: