Simple calculations give minus in environment

When using the following simple code for calculating the confidence interval it gives minus in the environment while it should be postive.
#Calculate the confidence interval

SE <-- 4.466389/sqrt(5122)
sqrt_value <- sqrt(5122)
SE <- 4.466389 / sqrt_value
#Calculate the lowerbound
LB <-- 25.77734-1.96*SE

It gives -25.899 in the environent. Can someone help me with that?

when you used two -- in the assignment operator <- in stead of one, you inverted the sign

a <-- 1
a
[1] -1

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.