Displaying 20 results from an estimated 3000 matches similar to: "Servreg $loglik"
2009 Feb 06
1
MLE for right-censored data with covariates
I am a student (and very to new to R) working on a senior design project that
is attempting to determine the demand distributions for single copy
newspaper draws at individual sales outlet locations. Our sales data is
right-censored, because sell-outs constitute a majority of the data, and we
are also testing the relevance of including covariates (weather,
seasonality, economic condition, etc.).
2004 Nov 09
2
Data Censoring and Normality Tests
Hello,
I would like to know if there is a function in R that will test for
normality and handle censored data sets. Currently, I evaluate each
censored data set by the extent to which a normal scores plot
approximate a straight line. For complete data sets I use
shapiro.test().
Below is an example of a censored data set.
data1<-c(0.00, 0.00, 0.00, 5.86, 5.17, 8.17, 5.12, 4.92, 7.08,
2006 Feb 13
2
Survreg(), Surv() and interval-censored data
Can survreg() handle interval-censored data like the documentation
says? I ask because the command:
survreg(Surv(start, stop, event) ~ 1, data = heart)
fails with the error message
Invalid survival type
yet the documentation for Surv() states:
"Presently, the only methods allowing interval censored data are
the parametric models computed by 'survreg'"
2007 Jun 08
0
Escobar&Meeker example survreg
Dear all,
I am new to R and may make beginner mistakes. Sorry.
I am learning using R to do survival analysis. As a start I used the
example script code provided in the documentation of predict.survreg of
the survival package:
# Draw figure 1 from Escobar and Meeker
fit <- survreg(Surv(time,status) ~ age + age^2, data=stanford2,
dist='lognormal')
plot(stanford2$age, stanford2$time,
2011 May 04
1
two-way group mean prediction in survreg with three factors
I'm fitting a regression model for censored data with three categorical
predictors, say A, B, C. My final model based on the survreg function is
Surv(..) ~ A*(B+C).
I know the three-way group mean estimates can be computed using the predict
function. But is there any way to obtain two-way group mean estimates, say
estimated group mean for (A1, B1)-group? The sample group means don't
2006 Mar 01
1
Drop1 and weights
Hi,
If I used drop1 in a weighted lm fit, it seems to ignore the weights
in the AIC calculation of the dropped terms, see the example below.
Can this be right?
Yan
--------------------
library(car)
> unweighted.model <- lm(trSex ~ (river+length +depth)^2-
length:depth, dno2)
> Anova(unweighted.model)
Anova Table (Type II tests)
Response: trSex
Sum Sq Df F value
2007 Aug 23
1
degrees of freedom question
R2.3, WinXP
Dear all,
I am using the following functions:
f1 = Phi1+(Phi2-Phi1)/(1+exp((log(Phi3)-log(x))/exp(log(Phi4)))
f2 = Phi1+(Phi2-Phi1)/(1+exp((log(Phi3)-log(r)-log(x))/exp(log(Phi4)))
subject to the residual weighting
Var(e[i]) = sigma^2 * abs( E(y) )^(2*Delta)
Here is my question, in steps:
1. Function f1 is separately fitted to two different datasets
corresponding to
2008 Jun 25
1
weighted inverse chi-square method for combining p-values
Hi,
This is more of a general question than a pure R one, but I hope that is OK.
I want to combine one-tailed independent p-values using the weighted version
of fisher's inverse chi-square method. The unweighted version is pretty
straightforward to implement. If x is a vector with p-values, then I guess
that this will do for the unweighted version:
statistic <- -2*sum(log(x))
comb.p <-
2012 Mar 25
1
Accessing more than two coefficients in a plot
I've successfully plotted (in the plot and abline code below) a simple regression of Lambda1_2 on VV1_2. I then successfully regressed Lambda1_2 on VV1_2, VV1_22 and VV1_212 producing lm2.l. When I go to plot lm2.l using abline I get the warning:
"1: In abline(lm2.l, col = "brown", lty = "dotted", lwd = 2) : only using the first two of 4 regression coefficients"
2000 Sep 17
1
Weighted Histogram
Greetings,
I'm having trouble finding a simple way to calculate a weighted
histogram where there may be zero raw counts in a given interval.
Given equal-length vectors of data 'data' and weights 'w', and breaks
(intervals) for the histogram, I calculate a weighted histogram as
follows (see MASS's 'truehist' for an unweighted histogram):
bin <- cut(data,
2007 Mar 22
3
Cohen's Kappa
Hi,
im little bit confused about Cohen's Kappa and i should be look into the
Kappa function code. Is the easy formula really wrong?
kappa=agreement-chance/(1-chance)
many thanks
christian
###############################################################################
true-negativ:7445
false-positive:3410
false-negativ:347
true-positiv:772
classification-aggrement:68,6%
2011 Oct 21
1
lattice::xyplot/ggplot2: plotting weighted data frames with lmline and smooth
In the HistData package, I have a data frame, PearsonLee, containing
observations on heights of parent and child, in weighted form:
library(HistData)
> str(PearsonLee)
'data.frame': 746 obs. of 6 variables:
$ child : num 59.5 59.5 59.5 60.5 60.5 61.5 61.5 61.5 61.5 61.5 ...
$ parent : num 62.5 63.5 64.5 62.5 66.5 59.5 60.5 62.5 63.5 64.5 ...
$ frequency: num 0.5 0.5
2006 Mar 01
2
Weighted networks and multigraphs
I would like to apply network measures (such as betweenness centrality,
upper boundedness, etc.) to a weighted graph with non-integer weights,
defined by a euclidean distance matrix. The package sna provides the
measures that I want to use, but seems only to operate on binary graphs.
I have read work by Mark Newman
(http://aps.arxiv.org/abs/cond-mat/0407503/), who suggests that a
weighted graph
2015 Jan 12
3
Polycom instant messages
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Is it possible to use the instant messaging feature of Polycom phones in
Asterisk? At the moment I'm seeing this in the SIP messaging when I try
to send one from a Polycom 450.
<--- SIP read from UDP:<CENSORED POLYCOM IP>:5060 --->
INVITE sip:0100@<CENSORED>:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP <CENSORED POLYCOM
2012 Feb 06
1
Simple lm/regression question
I am trying to use lm for a simple linear fit with weights. The results
I get from IDL (which I am more familiar with) seem correct and
intuitive, but the "lm" function in R gives outputs that seem strange to me.
Unweighted case:
> x<-1:4
> y<-(1:4)^2
> summary(lm(y~x))
Call:
lm(formula = y ~ x)
Residuals:
1 2 3 4
1 -1 -1 1
Coefficients:
2005 Jun 16
1
Survey - Cluster Sampling
Dear WizaRds,
I am struggling to compute correctly a cluster sampling design. I want
to do one stage clustering with different parametric changes:
Let M be the total number of clusters in the population, and m the
number sampled. Let N be the total of elements in the population and n
the number sampled. y are the values sampled. This is my example data:
clus1 <-
2006 Aug 25
1
R.squared in Weighted Least Square using the Lm Function
Hello all,
I am using the function lm to do my weighted least
square regression.
model<-lm(Y~X1+X2, weight=w)
What I am confused is the r.squared.
It does not seem that the r.squared for the weighted
case is an ordinary 1-RSS/TSS.
What is that precisely?
Is the r.squared measure comparable to that obtained
by the ordinary least square?
<I also notice that
model$res is the unweighted
2010 Feb 25
1
Minimum Spanning Trees
Hi,
I need to find all minimum spanning trees of an unweighted graph.
Is there a way in R to do that?
Thanks
--
View this message in context: http://n4.nabble.com/Minimum-Spanning-Trees-tp1569351p1569351.html
Sent from the R help mailing list archive at Nabble.com.
2007 May 31
2
Factor analysis
Hi,
is there any other routine for factor analysis in R then factanal?
Basically I'am interested in another extraction method then the maximum
likelihood method and looking for unweighted least squares.
Thanks in advance
Sigbert Klinke
2011 Feb 23
1
Weighted Mean By Factor Using "BY"
Hello R folks,
Reproducible code below - I'm trying to do a weighted mean by a factor and
can't figure it out. Thanks in advance for your assistance.
Mike
data<-data.frame(c(5,5,1,1,1),
c(10,8,9,5,3),
c("A","A","A","B","B"))