πŸ“Š R Programming
Q. What will be the output of the following R code?
function(p) {
params[!fixed] <- p
mu <- params[1]
sigma <- params[2]
## Calculate the Normal density
a <- -0.5*length(data)*log(2*pi*sigma^2)
b <- -0.5*sum((data-mu)^2) / (sigma^2)
-(a + b)
}
> ls(environment(nLL))
  • (A) "data" "fixed" "param"
  • (B) "data" "variable" "params"
  • (C) "data" "fixed" "params"
  • (D) "data" "param"
πŸ’¬ Discuss
βœ… Correct Answer: (C) "data" "fixed" "params"

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
81
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
92%
Success Rate