-1

I am a beginner in R and I am supposed to make a model thanks to regression beta. I learned that I can use betareg() except that even when installing its package the R does not recognize it and displays me error:

Error: could not find function "betareg"

What could be the cause for that?

MWiesner
  • 8,868
  • 11
  • 36
  • 70
E.Marwa
  • 3
  • 2
  • Welcome to StackOverflow. Your question does not supply enough information, please take a look a the help on how to ask a question. – chrisis Aug 09 '17 at 10:40

1 Answers1

2

The error message you are getting typically arises when calling a function. Before you can call a function, you have to install the package and load the library.

You can try this:

install.packages("betareg")
library(betareg)

and then call the function with relevant parameters

betareg()
Aramis7d
  • 2,444
  • 19
  • 25
  • I'm sorry, but I'm going to ask you another question. the dependent variable admits even the 0 and1 and by using the betareg () function I get this error: Error in if (!(min(Y) > 0 & max(Y) < 1)) stop("invalid dependent variable, all observations must be in (0, 1)") : missing value where TRUE/FALSE needed In addition: Warning message: In model.response(mf, "numeric") : NAs introduced by coercion Knowing that I use as link the function probit, or logit or clog-log but it does not work. I do not know if it is due to the package or the handling with which I write the arguments of betareg. – E.Marwa Aug 09 '17 at 14:10
  • @E.Marwa it'll be easier for us to help you if you post a separate question. please read [this](https://stackoverflow.com/help/mcve) guide and [this](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) guide for help with formulating the question in order to maximize chances of getting an answer. :) – Aramis7d Aug 09 '17 at 17:04