My previous expression is ok. But I agree using argument 'data' will be a better choice especially when there are many variables from the object specified by 'data'.

On 2010-9-1 16:23, Gavin Simpson wrote:
On Wed, 2010-09-01 at 11:05 +0800, Dejian Zhao wrote:
try
fit=vglm(mydata[,"Loss"]~1,pareto1(location=alpha),trace=TRUE,crit="c")
No, please don't. That is not a good example of formula use in R.
Several responders have already pointed out that the 'R' way of doing
this would be to use a data argument to tell vglm where to find the
variables mentioned in the formula. So your example would become:

fit<- vglm(Loss ~ 1, data = mydata, family = pareto1(location = alpha),
             trace = TRUE, crit = "coef")

HTH

G

On 2010-9-1 3:20, choonhong ang wrote:
Hi All,

could anybody help me to understand what is this error means ?


mydata=read.table("C:/Documents and
Settings/angieb/Desktop/CommercialGL/cl_ilf_claimdata.csv",header=TRUE,sep=",")

names(mydata)

[1] "ILFTable"    "liabLimit"   "AnnAggLimit" "DedAmt"      "Loss"
"TIL"

fit=vglm(Loss~1,pareto1(location=alpha),trace=TRUE,crit="c")

Error in eval(expr, envir, enclos) : object "Loss" not found

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to