Displaying 20 results from an estimated 800 matches similar to: "Question about glm using R"
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
2011 Mar 12
3
betareg help
Dear R users,
I'm trying to do betareg on my dataset.
Dependent variable is not normally distributed and is proportion (of condom
use (0,1)).
But I'm having problems:
gyl<-betareg(cond ~ alcoh + drug, data=results)
Error in optim(par = start, fn = loglikfun, gr = gradfun, method = method, :
initial value in 'vmmin' is not finite
Why is R returning me error in optim()?
What
2008 Oct 05
1
Sample mean in R
I am having issues with the following:
(muhat = 1/n^2(sum of all the xi's) )
essentially if xbar = the sample mean, muhat = sample mean but square the n.
Question:
Use R to run a Monte Carlo simulation which compares the finite-sample
performance of xbar and muhat. Specifically generate 1000 samples n=30 from
a standard normal distribution. For each sample calculate xbar and muhat. I
have
2011 Sep 02
5
Hessian Matrix Issue
Dear All,
I am running a simulation to obtain coverage probability of Wald type
confidence intervals for my parameter d in a function of two parameters
(mu,d).
I am optimizing it using "optim" method "L-BFGS-B" to obtain MLE. As, I
want to invert the Hessian matrix to get Standard errors of the two
parameter estimates. However, my Hessian matrix at times becomes
2002 Jul 03
1
complex numbers in library function (PR#1737)
Full_Name: Alex Deckmyn
Version: 1.5.1
OS: Linux Mandrake 7.0
Submission from: (NULL) (193.190.63.62)
A short function in a library contains the complex number -2i :
phihat <- function(x)
{
x+ (-2i)
}
If i read the source file with source("phihat") this works fine. If I include it
as
a function in a library and read it with library(test), the function is still
read
2012 Feb 10
3
Help needed please
I have coded a time series from simulated data:
simtimeseries <- arima.sim(n=1024,list(order=c(4,0,0),ar=c(2.7607, -3.8106, 2.6535, -0.9258),sd=sqrt(1)))
#show roots are outside unit circle
plot.ts(simtimeseries, xlab="", ylab="", main="Time Series of Simulated Data")
# Yule ----------------------------------------------------------------------------
q1 <-
2002 Aug 29
8
lme() with known level-one variances
Greetings,
I have a meta-analysis problem in which I have fixed effects
regression coefficients (and estimated standard errors) from identical
models fit to different data sets. I would like to use these results
to create pooled estimated regression coefficients and estimated
standard errors for these pooled coefficients. In particular, I would
like to estimate the model
\beta_{i} = \mu +
2005 Apr 05
2
Stats Question: Single data item versus Sample from Norma l Distribution
Here's one possibility, assuming muhat and sigmahat are estimtes of mu and
sigma from N iid draws of N(mu, sigma^2):
tStat <- abs(x - muhat) / sigmahat
pValue <- pt(tStat, df=N, lower=TRUE)
I'm not quite sure what df tStat should have (exercise for math stat), but
given fairly large N, that should make little difference.
Andy
> From: Ross Clement
>
> Hi. I have a
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
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:
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
2007 Jul 28
4
beta regressions in R
Good morning,
Does anyone know of a package or function to do a beta regression?
Thanks,
Walt Paczkowski
_________________________________
Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
(V) 609-936-8999
(F) 609-936-3733
2013 Sep 18
1
dbeta may hang R session for very large values of the shape parameters
Dear all,
we received a bug report for betareg, that in some cases the optim call in betareg.fit would hang the R session and the command cannot be interrupted by Ctrl-C?
We narrowed down the problem to the dbeta function which is used for the log likelihood evaluation in betareg.fit.
Particularly, the following command hangs the R session to a 100% CPU usage in all systems we tried it (OS X
2005 Oct 06
1
Simple question.....
Hi all user R,
My simple question is...I have a vector of names of predictors,
text<-c("datem","cola","eslom")...I try to plot the model with this predictor in sequence loop....,
for(i in 1:3){
png(paste("fig_",i,sep=""))
plot(preplot.gam(mod9)[[i]],se=T,rug=F,main="",xaxt="n",ylab="",xlab="")
2011 Nov 29
1
Notation
Hi,
what's mean "/" in command:
betareg(inf~Grupo/Sexo, data=dados)
it's a effect nested?
--------------------------------------
Silvano Cesar da Costa
Departamento de Estat?stica
Universidade Estadual de Londrina
Fone: 3371-4346
2011 Oct 01
1
Fitting 3 beta distributions
Hi,
I want to fit 3 beta distributions to my data which ranges between 0 and 1.
What are the functions that I can easily call and specify that 3 beta
distributions should be fitted?
I have already looked at normalmixEM and fitdistr but they dont seem to be
applicable (normalmixEM is only for fitting normal dist and fitdistr will
only fit 1 distribution, not 3). Is that right?
Also, my data has 26
2011 Apr 11
1
Regression model with proportional dependent variable
Hello, dear experts. I don't have much experience in building
regression models, so sorry if this is too simple and not very
interesting question.
Currently I'm working on the model that have to predict proportion of
the debt returned by the debtor in some period of time. So the
dependent variable can be any number between 0 and 1 with very high
probability of 0 (if there are no payment)
2012 Mar 19
4
regression with proportion data
Hello,
I want to determine the regression relationship between a proportion (y)
and a continuous variable (x).
Reading a number of sources (e.g. The R Book, Quick R,help), I believe I
should be able to designate the model as:
model<-glm(formula=proportion~x, family=binomial(link="logit"))
this runs but gives me error messages:
Warning message:
In eval(expr, envir, enclos) :
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