Displaying 20 results from an estimated 300 matches similar to: "betareg help"
2011 Feb 21
1
difference in pairs ?
Dear all,
I want to perform paired Wilcoxon signed ranks test on my data.
I have pairs defined by ID and TIME variables.
How can I calculate difference in variables q1, q2 in each pair?
TIME ID q1 q2
1 1187 3 2
1 1706 3 3
1 1741 2 4
2 1187 3 2
2 1706 3 3
2 1741 2 4
Please, any clue!
:)
--
**************************
Vlatka Matkovic Puljic
+32/ 485/ 453340
[[alternative HTML version
2010 Apr 21
1
median Q?
Hi,
I have dataset n1 and v1 (years).
when i ask
median(year)
[1] NA
but if i put summary of dataset n1:
summary(n1)
R produces median (together with min/max/mean....)
why it is so?
--
**************************
Vlatka Matkovic Puljic
095/8618 171
[[alternative HTML version deleted]]
2010 Apr 07
2
recoding variables-recode not working
Hi,
I have numerical variable that I want to recode into categories '0' and '1
and more' and do analysis with that data.
I have tried various of possibilities to do so, but I am sucked and nothing
is working.
recode(Q12, "0='A';1:30='B'")
cut(Q12, breaks=c(0,1,30), lables=c('0', '1 and more'))
cat(Q12, "0=0;1-33=1")
What should
2012 Jul 25
1
network plot problem
**Hi,
I wanted to create a network of drugs that are being studied together.
So, I created a file as a graph.
But plot of my network is not corect!
It looks like to me that something else is lying behind this network links
created.
Could someone help me with this?
Thanx!
a<-read.graph(file=file.choose(), format="edgelist")
plot.igraph(a)
File (number present ID of drug):
15 2
10
1998 Apr 27
1
R-beta: vectors in dataframe?
I have a file:
x y z
0.025 0.025 1.65775
0.025 0.050 1.62602
0.025 0.075 1.63683
0.025 0.100 1.91847
0.025 0.125 2.00913
0.025 0.150 1.82222
0.025 0.175 1.70901
0.025 0.200 1.39759
0.025 0.225 1.39089
0.025 0.250 1.04762
If I read the file like this:
data<-read.table("file.dat")
How do I access the vectors x,y,z that are inside the dataframe data? I
studied Venables and
2010 Apr 21
2
calculating age from year of birth and date?
Hi,
I have v1 (date of test) and v2 (year of birth).
v1 v2
15.5.2008 88
18.6.2009 54
I want R to use only year in v1; and v2 see as 1988 and calculate age in v3.
any ideas how to do that?
--
**************************
Vlatka Matković Puljić
095/8618 171
[[alternative HTML version deleted]]
2009 Feb 13
1
need help with errors in betareg analysis
Hi
I'm trying to fit a model in betareg and I'm getting errors, but have no
idea what they mean or how to solve them. Does anyone have experience with
this?
> model <- betareg(ACT ~ ST*SoilT, data = actDL_F)
Warning messages:
1: In sqrt(W) : NaNs produced
2: In sqrt(W) : NaNs produced
3: In sqrt(1 + phihat) : NaNs produced
data summaries don't give any na's or problems I
2006 Apr 17
1
using betareg: problems with anova and predict
Dear R-helpers:
We have had fun using betareg to fit models with proportions as
dependent variables.
However, in the analysis of these models we found some wrinkles and
don't know where is the best place to start looking for a fix.
The problems we see (so far) are that
1. predict ignores newdata
2. anova does not work
Here is the small working example:
----------------------------
x
2007 Jan 18
2
The math underlying the `betareg' package?
Folks,
The betareg package appears to be polished and works well. But I would
like to look at the exact formulas for the underlying model being
estimated, the likelihood function, etc. E.g. if one has to compute
\frac{\partial E(y)}{\partial x_i}, this requires careful calculations
through these formulas. I read "Regression analysis of variates
observed on (0,1): percentages, proportions and
2011 Sep 01
3
betareg question - keeping the mean fixed?
Hello,
I have a dataset with proportions that vary around a fixed mean, is it
possible to use betareg to look at variance in the dispersion parameter
while keeping the mean fixed?
I am very new to R but have tried the following:
svec<-c(qlogis(mean(data1$scaled)),0,0,0)
f<-betareg(scaled~-1 | expt_label + grouped_hpi, data=data1, link.phi="log",
2011 Jun 24
3
Error using betareg
Dear all,
I get an error using betrag on this data set
:http://dl.dropbox.com/u/1866110/dump.csv.
I run it like this
regression f2.1=betareg(Y~X1+X2,data=dump)
summary(f2.1)
I get :
Call:
betareg(formula = Y ~ X1 + X2, data = dump)
Standardized weighted residuals 2:
Error in quantile.default(x$residuals) :
missing values and NaN's not allowed if 'na.rm' is FALSE
In addition:
2010 Jan 12
1
Problems with betareg()
Hi,
In using the betareg package, I encounter the following error message:
Error in lm.wfit(x, linkfun(y), weights, offset = offset) :
NA/NaN/Inf in foreign function call (arg 4)
Any help will be most appreciated. Thanks in advance.
Alex
2010 Apr 06
0
betareg 2.2-2: Beta regression
Dear useRs,
version 2.2-2 of the "betareg" package has just been released on CRAN
http://CRAN.R-project.org/package=betareg
accompanied by an article in the Journal of Statistical Software
http://www.jstatsoft.org/v34/i02/
The package provides beta regression for data in the unit interval (0, 1)
such as rates and proportions. The manuscript replicates several practical
2010 Apr 06
0
betareg 2.2-2: Beta regression
Dear useRs,
version 2.2-2 of the "betareg" package has just been released on CRAN
http://CRAN.R-project.org/package=betareg
accompanied by an article in the Journal of Statistical Software
http://www.jstatsoft.org/v34/i02/
The package provides beta regression for data in the unit interval (0, 1)
such as rates and proportions. The manuscript replicates several practical
2009 Oct 05
1
How to get NA's into the output of xtabs?
Dear all,
Lets say I have the following data frame:
> df1 <- data.frame(Show=c('Star Trek', 'Babylon 5', 'Dr Who'), Size=c(0.7, 0.0, 0.701), Date=as.Date(c('2007-08-03', '2007-08-03', '2007-08-03'), format='%Y-%m-%d'))
> df2 <- data.frame(Show=c('Star Trek', 'Dr Who', 'Torchwood'), Size=c(0.8, 0.85,
2010 Mar 03
1
Zero inflated negative binomial
Hi all,
I am running the following model:
> glm89.nb <- glm.nb(AvGUD ~ Year*Trt*Micro)
where Year has 3 levels, Trt has 2 levels and Micro has 3 levels.
However when I run it has a zero inflated negative binomial (as I have lots
of zeros) I get the below error message:
> Zinb <- zeroinfl(AvGUD ~ Year*Trt*Micro |1, data = AvGUD89, dist =
"negbin")
Error in optim(fn =
2009 Nov 29
1
Convergence problem with zeroinfl() and hurdle() when interaction term added
Hello,
I have a data frame with 1425 observations, 539 of which are zeros. I
am trying to fit the following ZINB:
f3<-formula(Nbr_Abs~ Zone * Year + Source)
ZINB2<-zeroinfl(f3, dist="negbin", link= "logit", data=TheData,
offset=log(trans.area), trace=TRUE)
Zone is a factor with 4 levels, Year a factor with 27 levels, and
Source a factor with 3 levels. Nbr_Abs is counts
2011 Apr 05
6
simple save question
Hi,
When I run the survfit function, I want to get the restricted mean
value and the standard error also. I found out using the "print"
function to do so, as shown below,
print(km.fit,print.rmean=TRUE)
Call: survfit(formula = Surv(diff, status) ~ 1, type = "kaplan-meier")
records n.max n.start events *rmean *se(rmean) median
200.000
2003 Feb 01
1
Trouble with optim
I am having trouble with optim. It claims to have converged to a minimum,
yet it has in the course of the optimization visited many points which are
closer to optimal. I would be grateful for any explanation of this
behaviour.
I'm trying to estimate the parameters in the model
X ~ Binomial(1,p) * NegBin(mu,theta).
So I define a log likelihood function, and invoke optim thus:
o <- optim
2006 Nov 28
2
Problem with pairs() in nlme
Dear r-helpers,
After successfully running
require(nlme)
vfr.lmL <- lmList(
estimate ~ (slant + respType + visField + hand)^2 | subject, vfr
)
pairs(vfr.lmL, id = 0.01, adj = -0.5) # Pinheiro & Bates (p. 141)
produces the following error:
Error in sprintf(gettext(fmt, domain = domain), ...) :
object "form" not found
Any guesses as to what I may have done wrong?