I need to extract t-test statistics from glm(). For example,
Coefficients:
Estimate Std. Error t value Pr(|t|)
(Intercept) 46.219911.6310 3.974 0.000106 ***
Var1 1.0440 0.5948 1.755 0.081088 .
Var2 -0.4717 2.0257 -0.233 0.816178
Dear list,
Does anyone have any experience on how to estimate the parameters of the
specific copula in R or S+??
For example, calculate the conditional d. f. of F(x2|x1) by using the
partial derivatives of the Clayton copula, C(u1|u2)=((u2^(-alpha)
+u1^(-alpha) - 1 )/ u2^(-alpha) )^-1/alpha-1
Hi, R users
I am trying to use EM algorithmto estimate a latent class model of discrete
choice. The basic model is a logit model which has two variables X=(X1,X2) and
the utility is defined as v = Beta*X. There are 3 classes of individuals each
has its own Beta values, so Beta is a 3*2
Hi,
I got the following example from MASS (10.2 Classic Nested Designs)
A cooperative trial in analytical chemistry taken from Analytical Methods
Committe (1987). Seven specimens were sent to six laboratories, each three
times a month apart for duplicate analysis. The response is the
Hi,
I got the following example from MASS (10.2 Classic Nested Designs)
A cooperative trial in analytical chemistry taken from Analytical Methods
Committe (1987). Seven specimens were sent to six laboratories, each three
times a month apart for duplicate analysis. The response is the
Hi,
Maybe this is a trivial question but I can not figure out a good solution.
I have a data frame fa and want to add a new column sum with the sum value
of fa$X1 grouped by fa$X3.
fa
X1 X2 X3
1 1 11 1
2 2 12 1
3 3 13 1
4 4 14 2
5 5 15 2
6 6 16 2
7 7 17 3
8 8 18 3
Suppose I have two columns of entries, how can I get the union of the
two columns? Please note: I input my columns through excel. These
entries have text format in excel. Also, out of curiosity, how can I
find out the data type of a data frame ?
a - read.csv(book1.csv)
a
n1 n2
1
lambda = 0
47.7477 : 0.547935 7.165428
--
Shg SUN
@China
__
R-help@stat.math.ethz.ch 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
Dear list,
I have a problem on persp()
x - u1data #first coloum in attached data
y - u2data #second coloum in attached data
f -
function(x,y){qgev(pnorm(rhoF*qnorm(pnorm((qnorm(y)-rho2*qnorm(x)/sqrt(1-rho2^2
+sqrt(1-rhoF^2)*qnorm(0.95)),-0.3935119, 0.4227890,
0.2701648)}
to appear: Too many steps in routine qsimp . Anyone has
any idea why this happens and are there better solutions for the integration
realization? Thanks a lot!
Best,
Lynette Sun
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r
- Original Message -
From: Lynette Sun [EMAIL PROTECTED]
To: r-help r-help@stat.math.ethz.ch
Sent: Thursday, November 16, 2006 2:41 PM
Subject: [R] how to realize integration in C?
Hi, all,
In order to save simulation time, I need to call C in R. For the C codes,
I
need integrate
exchange with R via files:(.
I use a fake email address in outlookexpress to prevent spam actually, (have
already discard some email addresses for that reason). and .. Sun is my real
name;)
have a nice day.
Sun
- 原始邮件
发件人: Dirk Eddelbuettel [EMAIL PROTECTED]
收件人: sun [EMAIL
on the object oriented
programing skill in R, so finally I went back to java for this GA work.
Thanks anyway. Have a nice weekend.
Sun
- Original Message -
From: Spencer Graves [EMAIL PROTECTED]
To: sun [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Sent: Thursday, November 09, 2006 3:17 AM
Hi,
I am looking for genetic optimization package that allow to define my own
chromosome solution and crossover/mutation opoerations. I checked genoud and
genopt, not with much effort of 'cause, with no luck.
Any one can shed some light on this? thanks.
these Pis has to follow but
just know they have to be equally random hence the question.
I thought Dirichlet(1,1, ..., 1) could do the trick for me.
Sun
- Original Message -
From: Duncan Murdoch [EMAIL PROTECTED]
To: Alberto Monteiro [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
I am trying to generate a vector of random numbers with the constraint that
they have to sum up to one with uniform distribution.
eg. {0.1,0.7,0.2 }
any function to do this? Thanks.
__
R-help@stat.math.ethz.ch mailing list
bump.
would like to know the answer too. I am about using nnet--multinom to
estimate a multinomial logit model, but are not sure if this function
handles categorical data input.
Thanks for any help.
- Original Message -
From: Bob Green [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Hi,
I 'd like to use multinom to estimate a multinomial logit model of a
conjoint survey with a format like:
individual 1 --choice -- X1-X2-X3
1-A1.2blue12
1-0-1.4red-13
Thanks for all these replies, all work perfectly.
Sun
--- Petr Pikal [EMAIL PROTECTED]写道:
Hallo
probably there are other options but
outer(1:3,a, ==)*1
can do what you want.
HTH
Petr
On 31 Aug 2006 at 22:41, z s wrote:
Date sent:Thu, 31 Aug 2006 22:41:27 +0800
Thanks for the suggestion! I switched to optimize(), al - optimize(f.fn, lower
= 0.1, upper =100,tol=0.001);
the warnings were gone and it works stably.
But when I tried al - uniroot(f.fn, lower = 0.1, upper =100,tol=0.001);
error occured: f() values at end points not of opposite sign. The
: William Asquith, [EMAIL PROTECTED]
Sent: 2006-07-17, 16:18:31
To: Leaf Sun, [EMAIL PROTECTED]
Subject: Re: [R] Weibull distribution
Do not have answer per se, but if you are seeking some
comparisons--
try three parameter Weibull as implemented by the lmomco package
please? Any suggestion would be
appreciated!
Leaf
- Original Message -
From: William Asquith, [EMAIL PROTECTED]
Sent: 2006-07-17, 16:18:31
To: Leaf Sun, [EMAIL PROTECTED]
Subject: Re: [R] Weibull distribution
Do not have answer per se, but if you are seeking some
Hi all,
By its definition, the mean and variance of two-par. Weibull distribution are:
(www.wikipedia.org)
I was wondering, if given mean and sd. could we parameterize the distribution?
I tried this in R.
gamma.fun - function(mu,sd,start=100)
{
f.fn - function(alpha)
dear all,
I am a new comer to R and statistic. Now I have a little confuse about the
package pls.
I have to use 5 components to form a model. There are strong relationship
between some of the components, which leads to the changes of the sign of
each coeficeince, of course this is unwanted when
Thanks to Douglas and all others who responded.
I applied nls(y ~ a*x^b, start = list(a = a1, b = b1), control =
list(maxiter = 500), trace=TRUE) to increase the number of iterations, found
it successful. The suggestion Douglas raised in plotting the data and then
tracing the
Sorry, I thought it was a straightforward question inside which I was stuck .
I used nls( ) to estimate a and b in this function.
nls(y~ a*x^b,start=list(a=a1,b=b1)
seems the start list I gave was not able to reach convergence and it gave
notes: number of iteration s exceeded maximum of 50.
Hi all,
I found r-site-research not work for me these days.
When I was doing nls( ) , there was an error number of iterations exceeded
maximum of 50. I set number in nls.control which is supposed to control the
number of iterations but it didn't work well. Could anybody with this
experience
Hi, All:
I only have 4 samples. I wish to get a confidence interval around the mean.
Is it reasonable? If not, is there a way to compute a confidence interval
for such small sample size's mean?
Many thanks,
U
[[alternative HTML version deleted]]
}
integrate(fr,-1,2)
works?
1.67 with absolute error 3.4e-05
Thanks.
Lynette Sun
Department of Statistics
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Hi R-listers,
I have a simple question about a data frame.
I sorted a data set by one of the variable in some condition (eg. X=0), the
followed is part of the achieved. I was wondering how can I get the row name,
i. e. (1202, 2077 , 2328, 3341,... ) and save them as a vector.
Hi,
I am new in writing R extension.
I read the Writing R Extensions, and search online but just cannot
find the answer.
I am trying to add c-code, which depend on GSL C library, into my R
package.
I am using Max OS-X 10.4.3, powerpc-apple-darwin8-gcc-4.0.1
I begin wtih package.skeleton,
Hi, I wonder if there is a package aimed at comparing two scoring systems.
Such as, to compare a student's performance (scores or ranks) in two
different testing systems to find out if they are consistent?
Sorry if this question is too naive. It seems easy but just wonder if there
are handy
Hi all,
I need to write and read a list in R. I did r.site.search, found there is a
package rmutil doing this, unfortunately it is not on the list of package.
In another words, I can't install it from any CRAN mirror.
Anybody has idea about this? or any suggestion about the list? Thanks!
In the logistic regression model, there is no residual
log (pi/(1-pi)) = beta_0 + beta_1*X_1 + .
But glm model will return
residuals
What is that?
How to understand this? Can we put some residual in the logistic regression
model by replacing pi with pi' (the estimated pi)?
log
-9140x23604
http://socserv.mcmaster.ca/jfox
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Urania Sun
Sent: Thursday, November 24, 2005 1:36 PM
To: r-help@stat.math.ethz.ch
Subject: [R] residuals in logistic
] wrote:
Dear Urania,
-Original Message-
From: Urania Sun [mailto: [EMAIL PROTECTED]
Sent: Thursday, November 24, 2005 8:52 PM
To: John Fox
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] residuals in logistic regression model
Thanks, Professor.
But is it ok to write
regression searched the r-help
maillist. But I donot find enough information about separation. Would
you be so kind to give me some suggestions on separation and the
better algorithms?
Thanks!
Sh.G. Sun
Prof Brian Ripley wrote:
On Tue, 22 Nov 2005, S. Sun wrote:
I have a question about the glm
, D, E))
events - c(0, 7, 10, 15, 17)
trials - rep(50, 5)
glm(cbind(events, trials-events)~treat, family=binomial)
What's wrong with it? And are there better ideas?
--
Sh. Sun
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo
2005, Leaf Sun wrote:
Dear all,
I'd like to change a point pattern to a grid of cells and use one of the
variables as the output.
e.g. The point pattern is of a window of (500*500) and several features
such as pH, SoilType etc. I like to divide it into a grid with cell
size 5*5, and use
Dear all,
I'd like to change a point pattern to a grid of cells and use one of the
variables as the output.
e.g. The point pattern is of a window of (500*500) and several features such
as pH, SoilType etc. I like to divide it into a grid with cell size 5*5, and
use the mean of the point
Sorry about this, I didn't know. I guess I have posted too much garbage on here.
Thanks to Edzer for your answers!
Leaf
=== At 2005-11-09, 02:14:21 you wrote: ===
Leaf, please note that r-help is not the appropriate place to ask
package-specific questions. We have r-sig-geo for
Hi, All: Does R have such packages for spatial epidemiology? Many thanks,
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Dear all,
Is there any simple way in R that can I put the all the interactions of the
variables in the OLS model?
e.g.
I have a bunch of variables, x1,x2, x20... I expect then to have
interaction (e.g. x1*x2, x3*x4*x5... ) with some combinations(2 way or higher
dimensions).
Is there
Thanks for the information!
Leaf
=== At 2005-11-06, 11:07:31 you wrote: ===
IMHO, the details section of help(formula) provides a nicer help.
Regards, Adai
On Sun, 2005-11-06 at 08:27 -0500, John Fox wrote:
Dear Leaf,
I assume that you're using lm() to fit the model
Anyone knows how to realize multiple exponential(different lembdas)
convolutons in R or where I can find the final equation? Thanks.
Best,
Lynette
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
=== At 2005-11-02, 12:07:12 you wrote: ===
Leaf Sun wrote:
The histogram is highly screwed to the right, say, the range
of the vector is [0, 2], but 95% of the value is squeezed in
the interval (0.01, 0.2).
I guess the histogram is as you wrote. See
http://web.maths.unsw.edu.au
Hi,
anyone knows about any functions in R can get multidimensional integration
not over a multidimensional rectangle (not adapt).
For example, I tried the following function f(x,n)=x^n/n!
phi.fun-function(x,n)
{ if (n==1) {
x
}else{
integrate(phi.fun, lower=0,
Dear listers,
A quick question about breaks in hist().
The histogram is highly screwed to the right, say, the range of the vector is
[0, 2], but 95% of the value is squeezed in the interval (0.01, 0.2). My
question is : how to set the breaks then make the histogram look even?
Thanks in
Hi,
anyone knows about any functions in R can get multidimensional integration
not over a multidimensional rectangle (not adapt).
For example, I tried the following function f(x,n)=x^n/n!
phi.fun-function(x,n)
{ if (n==1) {
x
}else{
integrate(phi.fun, lower=0,
, 04:31:54 you wrote: ===
On Mon, 24 Oct 2005, Leaf Sun wrote:
Running R 2.2.0 on winXP. Computer P4 CPU 3.2G and 1G of RAM.
Please try the attached Windows binary package. Look at the help page for
ann.dist(). It returns a list of three elements, the first, lnn, gives the
index numbers
Hi all,
Has anybody have the experience in the errors:
Error in data.frame(..., check.names=FALSE): arguments imply differing number
of rows: 343,15
This is the error occured in the middle of the program. I don't think the data
frame has any problem, if there is problem with the program, why
Dear all,
I got point data of trees. I was wondering if anybody has experience in
searching the neighbors within a specified distance efficiently.
XY Z
99 34 65
98 35 29
98 34 28
99 33 33
98 32 23
99 33 21
99 33
Dear all,
I have a date frame like this:
X Y Z
22 24 4.3
2.3 3.4 5.3
.
57.223.434
What my purpose is: to sort the data frame by either X, Y or Z.
sample output is (sorted by X) :
X Y Z
2.3 3.4 5.3
.
..
22 24 4.3
...
57.2 23.4 34
I have
in SAS (the SAS procedure reg).
Actually, some times we run such regressions for about 300K securities.
Performing regressions in loop takes a long time. On the contrary, running
on SAS is much faster.
Thank you in advance.
Heng Sun
212-855-5754
Director
Quantitative Risk
Depository Trust
To
Heng Sun [EMAIL PROTECTED]
cc
r-help@stat.math.ethz.ch
Subject
Re: [R] run many linear regressions against the same independent variables
in batch
This runs a regression of each column (except the first)
of matrix state.x77 against the first:
lm(state.x77[,-1] ~ state.x77[,1])
On 10/14/05
Dear All:
Does R have the package as in SAS's generalized logits model for nominal
response data? I have searched but cannot find the windows package.
Many thanks,
HS
__
R-help@stat.math.ethz.ch mailing list
Dear Professor: Thanks! I just found it. It is bundled within the VR
package.
Hongyu
- Original Message -
From: John Fox [EMAIL PROTECTED]
To: 'Hongyu Sun' [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Sent: Sunday, October 02, 2005 3:27 PM
Subject: RE: [R] generalized linear model
Hi, Sorry I have to bother a question.
Does R have the functions to do lsd, tukey, bonferonni, contrast etc. like
in SAS?
Many thanks,
HS
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
hi, all,
how to decide the number of cluster before you use kmeans and hclust?
thank you in advance!
best
-xpsun
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
hi, all
i hava a dataset formated as follow:
x1 y1 z1
x2 y2 z2
x3 y3 z3
...
how to cluster it with hclust?
and the draw the data with color of cluster?
thank you in advance!
best!
xpsun
$cluster, file = m0028.ks, ascii = TRUE) :
Object cl$cluster not found
when i wanted to save the vector of cluster only, a reflection was
thrown out as that.
could i save cl$cluster only? how?
thank you in advance.
best,
xp sun
. Also what do the shape matrix, radius correspond to an
ellipse function
(x-x0)^2/a + (y-y0)^2/b = 1
? Please advise!
Many thanks,
Sun
[[alternative HTML version deleted]]
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r
[200]
What is wrong?
I don't understand the shape and radius's meaning so I have no idea of what
object's lenght.
Many thanks!
Sun
- Original Message -
From: Patrick Burns [EMAIL PROTECTED]
To: Sun [EMAIL PROTECTED]
Sent: Wednesday, October 27, 2004 3:51 AM
Subject: Re: [R] ploting
)^2/b =1
. Since I used chi-square percentile not t. I am trying to obtain the large
sample 95% simultaneous confidence ellipse for two population means (say,
weight and height). The input are the two sample means and their
covariances.
Maybe I have to make my own ellipse function.
Sun
to divide the
righ hand side and square root to get the radius and no inverse needed).
Thank you! By the way, I tried to write my own and it does not work only
giving two parallel lines.:(
Now the ellipse in car works totally well!
Sun
- Original Message -
From: John Fox [EMAIL PROTECTED
-conformable arguments
How to convert a matrix to the format could be accepted by pcurve?
Any help appreciated!
Regards
- Sun
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R
)
**
well, but it plots nothing out.
I wonder if you could help me? Seems R is hard to learn without your help.
Many thanks,
Sun
[[alternative HTML version deleted]]
__
[EMAIL PROTECTED] mailing list
https
clearly the weight = standard deviation. It said it is to minimize
sum w*error^2, which mislead us to think it takes variance. I have to ask
experienced people. And everytime the answer depends on luck.
Thanks,
- Original Message -
From: Andrew Ward [EMAIL PROTECTED]
To: Sun [EMAIL
))
cloud(data1)
cloud(f(x,y) ~ x *y)
Thanks a lot
- Original Message -
From: Spencer Graves [EMAIL PROTECTED]
To: Sun [EMAIL PROTECTED]
Cc: R-help mailing list [EMAIL PROTECTED]
Sent: Saturday, October 16, 2004 11:06 PM
Subject: Re: [R] how to draw a multivariate
: Deepayan Sarkar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Sun [EMAIL PROTECTED]; Andrew Ward [EMAIL PROTECTED]
Sent: Sunday, October 17, 2004 12:04 AM
Subject: Re: [R] how to draw a multivariate function
On Saturday 16 October 2004 23:12, Sun wrote:
Hi, All:
Thanks. Here is the code
Hello, Rusers:
What is the maximum number of data R can handle? Or I have to use SAS? I am
trying to do some microarray data analysis. But I am totally new. Did anyone
use R to do microarray analysis?
Many thanks,
Sun
__
[EMAIL PROTECTED] mailing
, this should belong to some
package. I did internet searches and found something
similar but not covering my case.
The restrictive access to web makes subscription from
my work place not convenient. Sorry.
Heng Sun
Senior Quantitative Analyst
Depository Trust and Clearing Corporation
New York, USA
the
exogenous factor? Is there a feasible way to convert
the general model to the simple model in R?
Thanks,
Heng Sun
___
Declare Yourself - Register online to vote today!
__
[EMAIL PROTECTED] mailing list
https
for a while. But seems not. I am
new to R. Your help is highly appreciated.
Many thanks. Looking forward to your response,
Sun
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R
Hi, Thanks all (Andrew, Peter, Sean)!
By the way, I looked at the xyplot in lattice library. It can draw a
versus b, conditioned on c. But it draws curves in different panels and
there seems no control on symbols.
I will try points.
Many thanks again,
Sun
- Original Message -
From
Hi,
when I write the likelihood function as
fn-function(x) -50*log(2*pi)-100*log(sigma)-(1/2*(sum((x-mu)/sigma)^2))
then what should I do since it shows that Error in log(sigma) : Object
sigma not found.
Thanks
edward
From: Edward Sun
Dear Sir/Madam,
I am using R version 1.8.1. I am
*log((sd(x))^2))-50*log(sqrt(2*pi))-(1/2*((mean(x))^2))*(sum((x-(mean(x))^2))
After I input above function, the '' '' turned to be '' + ''. and it did
not work.
I am looking for the help to solve this tast by writting a likelihood
function.
Thanks a lot.
Best regards.
edward sun
*log((sd(x))^2))-50*log(sqrt(2*pi))-(1/2*((mean(x))^2))*(sum((x-(mean(x))^2))
After I input above function, the '' '' turned to be '' + ''. and it did
not work.
I am looking for the help to solve this tast by writting a likelihood
function.
Thanks a lot.
Best regards.
edward sun
p.s
x=rnorm(100
))-50*log(sqrt(2*pi))-(1/2*((mean(x))^2))*(sum((x-(mean(x))^2)),
but it did not work.
I am looking for the complete syntax to finish my target task.
Thanks for your help.
Best regards.
Edward Sun
Germany
__
[EMAIL PROTECTED] mailing list
https
you please help me to compose the syntax for the
purpose that find maximum likelihood estimates of the generated random
numbers by direct maximization of the likelihood function?
Thanks a lot.
Best regards
Edward Sun
__
[EMAIL PROTECTED] mailing list
The distribution of your message dated Tue, 27 Jan 2004 09:41:55 -0300 with
subject test has been postponed because the DOCS list is held. No action
is required from you; your message will be reprocessed automatically once
the list owner releases the list.
in advance.
Regards,
Jean Sun
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
2003-09-23 07:07:00 Thomas Lumley wrote
On Tue, 23 Sep 2003, Jean Sun wrote:
From basic statistics principle,we know,given several i.i.d Gaussian
RVs with zero or nonzero mean,the sum of square of them is a central or
noncentral Chi-distributed RV.However if these Gaussian RVs have
From basic statistics principle,we know,given several i.i.d Gaussian RVs with zero or
nonzero mean,the sum of square of them is a central or noncentral Chi-distributed
RV.However if these Gaussian RVs have different variances,what does the sum of square
of them obey?
Thanks in advance.
84 matches
Mail list logo