ideas what is happening, or what to do about it? Thanks.
P.S. I haven't had success in attaching data files when I submit to the R
help list, so if you would like the data please email me at
andrewami...@hotmail.com.
Andrew Miles
[[alternative HTML version deleted
Miles
On Jul 21, 2012, at 12:59 PM, yrosseel wrote:
On 07/20/2012 10:35 PM, Andrew Miles wrote:
Hello!
I am trying to reproduce (for a publication) analyses that I ran
several months ago using lavaan, I'm not sure which version, probably
0.4-12. A sample model is given below:
pathmod
wishing to reproduce the problem, you can download a
sample code file and data frame from the following two links.
https://fds.duke.edu/db/aas/Sociology/grad/aam34/files/problem%20code.R
https://fds.duke.edu/db/aas/Sociology/grad/aam34/files/sampledat.rdata
Thanks for your help!
Andrew Miles
) fits just the interaction between x and w without an
intercept, and without the main effects for x and w
lm(y ~ x/w - 1) I believe this fits the nested factor w inside of x
Andrew Miles
On Jun 5, 2012, at 4:58 PM, Michael wrote:
I read your website but still don't know the difference
, they are treated as any other
object, which is to say that you can only have one function of the same name at
a time. Hence whenever you call a source file to load in function A, the old
function A gets overwritten.
Andrew Miles
On Jun 5, 2012, at 4:58 PM, Michael wrote:
Hi all,
How do I obtain
.
Andrew Miles
[[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
=
likelihood). AIC is a function of the likelihood but , as far as I know,
likelihood is not a function of the AIC.
Thanks for any insight.
On Thu, May 31, 2012 at 9:26 AM, Duncan Murdoch
murdoch.dun...@gmail.comwrote:
On 12-05-31 8:53 AM, Andrew Miles wrote:
Two related questions.
First
.
Andrew Miles
Department of Sociology
Duke University
On Apr 6, 2012, at 9:48 AM, Eiko Fried wrote:
Hello,
I've been trying to answer a problem I have had for some months now and
came across multivariate multilevel modeling. I know MPLUS and SPSS quite
well but these programs could not solve
() in the lme4 package, but has the advantage of being able to specify
correlations between errors across time, the ability to control for
time-invariant effects of time-invariant variables, and allows you to use
the missing data maximum likelihood that comes in structural equation
modeling packages.
Andrew
be interested in updates on this, and in your thoughts on this more
generally. Also, please let me know if there is a forum better suited for this
kind of discussion.
Andrew Miles
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo
Allison's booklet for more details on this method.
Allison, Paul D. 2009. Fixed Effects Regression Models. Los Angeles, C.A.: Sage.
Andrew Miles
On Feb 7, 2012, at 5:00 PM, caribou...@gmx.fr wrote:
Dear R-helpers,
First of all, sorry for those who have (eventually) already received
in seq(0,0.5,0.1)) {
sigmasqaured - 1
i = complex(real = 0, imaginary = 1)
spectrum - c(spectrum,
(sigmasqaured)/(abs(1-2.7607*exp(2*pi*i*f)+3.8106*exp(4*pi*i*f)-2.6535*exp(6*pi*i*f)+0.9258*exp(8*pi*i*f))^2))
}
spectrum
Andrew Miles
On Feb 7, 2012, at 4:08 PM, Jaymin Shah
Take a look here.
http://stackoverflow.com/questions/2185252/reshaping-data-frame-from-wide-to-long-format
Andrew Miles
Department of Sociology
Duke University
On Oct 6, 2011, at 4:28 PM, Gang Chen wrote:
I have some data 'myData' in wide form (attached at the end), and
would like to convert
that an answer to this
question will be documented.
Andrew Miles
I am using the mlogit packages and get a data problem, for which I can't
find any clue from R archive.
code below shows my related code all the way to the error
)
Andrew Miles
[[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
Perhaps the easiest way to incorporate the heteroskedasticity
consistent SE's and output them in a familiar and easy to interpret
format is to use coeftest() in the lmtest package.
coeftest(myModel, vcov=vcovHC(myModel))
Andrew Miles
On Jan 20, 2011, at 4:42 PM, Achim Zeileis wrote
I assume you mean PDFs generated by R. This topic has been addressed
here: http://tolstoy.newcastle.edu.au/R/e2/help/07/05/17475.html
I have always just output the graphics then used an external PDF
program (like Preview on the Mac) to do changes in file type, size
reductions, etc.
Andrew
I always use apsrtable in the apsrtable package, which allows you to
specify a vcov matrix using the se option. The only trick is that
you have to append it to your model object, something like this:
fit=lm(y ~ x)
fit$se=vcovHC(fit)
apsrtable(fit, se=robust)
Andrew Miles
On Jan 5, 2011
SEs
library(sandwich)
library(lmtest)
reg=lm(fsn~lctot)
coeftest(reg, vcov=vcovHC(reg))
Or to get cluster robust SEs, check out this: people.su.se/~ma/
clustering.pdf
Hope that helps.
Andrew Miles
On Jan 1, 2011, at 10:09 AM, Charlène Cosandier wrote:
Hi,
I have ove the robust standard
It is hard to say without knowing more about the type of model you are
running.
A good place to look would be at the coeftest() function in the
package lmtest.
Andrew Miles
On Dec 20, 2010, at 10:04 AM, JoonGi wrote:
I just corrected std.error of my 'model'(Multi Regression
Take a look at mtext() which offers options for writing text in any
margin of the table.
Andrew Miles
On Dec 17, 2010, at 6:41 AM, phils_mu...@arcor.de wrote:
Hi,
I want to have a title for the y-axis on the right side of the plot.
I know how to do it on the left side:
title(ylab=Title
Try sample() which will allow you to randomly select 10 ID's from your
ID variable, which you can then plot.
Andrew Miles
On Dec 16, 2010, at 10:49 AM, Rasanga Ruwanthi wrote:
Hi
I am using following code to produce a xyplot for some longitudinal
data. There are 2 panels. It produced
Try:
plot (myCatVariable)
Andrew Miles
Department of Sociology
Duke University
On Dec 1, 2010, at 2:51 PM, phoebe kong wrote:
Hi,
Can someone tell me how to draw a histogram for the following summary?
Richard Minnie Albert Helen Joe Kingston
1233 56 67
=as.factor(x)
plot(x)
See also ?plot.factor
Andrew Miles
On Dec 1, 2010, at 4:06 PM, Jorge Ivan Velez wrote:
Hi Phoebe,
Try
x - c(12, 33, 56, 67, 15, 66)
names(x) - c('Richard','Minnie','Albert','Helen','Joe','Kingston')
barplot(x, las = 1, space = 0)
HTH,
Jorge
On Wed, Dec 1, 2010 at 2:51 PM
the number of samples without the outlier
N.nooutlier = Total - count
Andrew Miles
On Nov 16, 2010, at 4:55 PM, ufuk beyaztas wrote:
Hi dear all,
i have a data (data.frame) which contain y and x coloumn(i.e.
y x
1 0.58545723 0.15113102
2 0.02769361 -0.02172165
3
There may be an easier way to do this, but you could always just do it
the long way.
Ex.
plot(residuals(test.lm)~fitted.values(test.lm))
Andrew Miles
On Nov 16, 2010, at 5:01 PM, casperyc wrote:
Hi all,
Say I fit a linear model, and saved it as 'test.lm'
Then if I use plot(test.lm
at the bottom of the help page that appears by
typing
?mi
OR for mice
?mice
mi is the newer package and has some useful control features, but as
it is newer it still is under development.
Andrew Miles
On Nov 2, 2010, at 3:38 PM, John Sorkin wrote:
I am looking for an R function
for variables so that
they can be exported using write.foreign()?
Thanks!
Andrew Miles
__
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
what is happening, and how to isolate the offending variables.
Andrew Miles
On Oct 20, 2010, at 1:18 PM, Nordlund, Dan (DSHS/RDA) wrote:
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of Andrew Miles
Sent: Wednesday, October 20
And thank YOU for taking the time to express your gratitude. I'm sure
all those who regularly take the time to contribute to the list
appreciate the appreciation.
Andrew Miles
On Oct 15, 2010, at 9:49 AM, Jumlong Vongprasert wrote:
Dear R-help mailing list and software development team
R works great on my Mac. In fact, the user interface in some ways
seems to be more friendly (ex. you type an open parenthesis, it
automatically includes a close parenthesis; color coding for coding
files, etc.)
Andrew Miles
On Oct 14, 2010, at 2:49 PM, David Cross wrote:
I have had
Type ?anova on your R command line for the basic function, and links
to related functions.
Also, try a google search of something like doing anova in R and you
should find multiple tutorials or examples.
Andrew Miles
On Oct 11, 2010, at 11:33 AM, Mauluda Akhtar wrote:
Hi,
I've a table
Try adding a statement at the beginning of your function:
require(micEcon)
See if that helps.
Andrew Miles
Department of Sociology
Duke University
On Oct 7, 2010, at 11:47 AM, Alison Callahan wrote:
Hello all,
I am trying to use the micEcon 'insertRow' function inside a function
I have
I haven't done much with the type of data you're working with, but
here is a post that lists a few packages for doing sample size
calculations in R. Perhaps one of them will be helpful.
https://stat.ethz.ch/pipermail/r-help/2008-February/154223.html
Andrew Miles
On Sep 27, 2010, at 2:09 PM
it probably doesn't know how to handle
the type of data you are putting into it.
Andrew Miles
Department of Sociology
Duke University
On Sep 27, 2010, at 11:03 PM, Kie Kyon Huang wrote:
Hi, I am a beginner in R and is trying to plot some dot plot from t
test
result.
I was following
First load the package lmtest. Then run the bptest.
library(lmtest)
bptest(modelCH)
You don't need to tell the function which variables are explanatory or
dependent. Just give it the fitted model object, and it will sort all
of that out and return the statistic.
Andrew Miles
Department
Another option is to use the par() command before executing a plot
command, like so:
par(mfrow=c(2,2))
plot(...)
This will put the next four plots all in the same window.
Andrew Miles
Department of Sociology
Duke University
On Sep 24, 2010, at 10:28 PM, Dennis Murphy wrote:
Which one do
!
Andrew Miles
Department of Sociology
Duke University
__
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
generate a SE for the difference in those predicted values?
Thanks in advance!
Andrew Miles
[[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
, preprocess = FALSE)
1: mi(imp.data, info = info2, n.iter = 6, preprocess = FALSE)
Andrew Miles
__
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
, mask = mask, size = 0, skip = TRUE,
softmax = TRUE, :
too many (2608) weights
System is Mac OS X 10.5.8, R version 2.9.2
Andrew Miles
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
that you want like so:
info[[min.func]]$params$MaxNWts=3000
This will add the parameter MaxNWts to the min.func model. This seems
to have solved the problem I outlined below.
Andrew Miles
On Jul 14, 2010, at 10:33 AM, Andrew Miles wrote:
I am trying to use the mi package to impute data
the axes
of the histogram to give the histograms for males and females the same
break points (i.e. where one bar stops and another begins). See ?hist
for more information about that.
Andrew Miles
Department of Sociology
Duke University
On Jul 9, 2010, at 9:29 AM, Mao Jianfeng wrote:
Dear R
is happening, and
can't see why I can sometimes impute a variable labeled as ordered-
categorical and sometimes cannot.
Thanks!
Andrew Miles
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
On Jul 6, 2010, at 1:30 PM, Peter Ehlers wrote:
On 2010-07-06 10:37, Andrew Miles wrote:
Hello!
I get the following message when I run the mi() function from the mi
package.
Error while imputing variable: c3 , model: mi.polr
Error in eval(expr, envir, enclos) : could not find function
On Jul 6, 2010, at 2:15 PM, Erik Iverson wrote:
This looks suspiciously like a syntax problem.
I would get my text editor to search for 'c14ordered'
in the code. You might have missed some punctuation.
-Peter Ehlers
A good thought. I checked my own code (the stuff coding the data
and
You could try Summarize in the NCStats package, or aggregate in the
epicalc package.
Andrew Miles
Department of Sociology
Duke University
On Jul 6, 2010, at 11:53 AM, karena wrote:
I have a dataset like the following:
subject class value
123110
1241
-in-Differences”
Models by Patrick A. Puhani. Did you find others? If you wouldn't
mind sending along the citations for what you found, that would be
very helpful.
Many thanks!
Andrew Miles
On Apr 29, 2010, at 10:45 PM, Kjetil Halvorsen wrote:
see comments below.
On Wed, Apr 28, 2010 at 4:29 PM
the issue addressed in the forums or in the examples of
logistic regression in R that I've found online.
Thanks!
Andrew Miles
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
, 6)
mat$g=ifelse(mat$t==dog, 2, mat$g)
mat$g=ifelse(mat$t==chick, 3, mat$g)
mat
t y g
1 cow 1 1
2 dog 3 2
3 chick 4 3
To days of the week would only be 7 statements.
Andrew Miles
Department of Sociology
Duke University
On Feb 26, 2010, at 2:31 PM, Steve Matco wrote:
Hi everyone,
I
$sampwt);
ddply(mydata, ~cut2(age,c(2,6,12,16)),'wtdmean')
hth, david freedman
Andrew Miles-2 wrote:
I've noticed that R has a number of very useful functions for
obtaining descriptive statistics on groups of variables, including
summary {stats}, describe {Hmisc}, and describe {psych}, but none
that combines
both the ability to provided weighted descriptives with the ability to
subdivide by the levels of some other variable?
Andrew Miles
Department of Sociology
Duke University
[[alternative HTML version deleted]]
__
R-help@r
52 matches
Mail list logo