Hi all,
I am having a problem running the "impute" function from the bnlearn
package.
I have tried running the example in the documentation as follows:
with.missing.data = gaussian.test
with.missing.data[sample(nrow(with.missing.data), 500), "F"] = NA
fitted = bn.fit(model2network("[
Hi Mr. Gunter,
Will do. Thanks, I've not visited stats.stackexchange before.
Kind Regards,
David
-Original Message-
From: Bert Gunter [mailto:bgunter.4...@gmail.com]
Sent: Thursday, March 16, 2017 7:51 PM
To: david.p...@statmetrics.biz
Cc: R-help
Subject: Re: [R] propensity
Way out of bounds for this list (see the posting guide). Try posting
on stats.stackexchange.com instead.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip
You have been posting to the R-help list long enough so that you should
have learned by now *not* to post in html. Your code is mangled so as
to be unreadable.
A few comments:
(1) Your data frame "data1" seems to have a mysterious (and irrelevant?)
column named "data1" as well.
(2) The c
Hi Paul,
It looks like the information that is printed is in:
TSModelForecast$mean
If str(TSModelForecast$mean) returns something like a list with two
components, you can probably use something like this:
paste(format(TSModelForecast$mean$Date,"%b-%Y"),
TSModelForecast$mean$Forecast,sep="-",col
Thanks, but I already solved it as you wrote it.
I was a missing comma.
On Thu, Mar 16, 2017 at 5:19 PM, jim holtman wrote:
> you are probably missing a comma:
>
> View(data[data$fact > 5000, ])
>
>
> Jim Holtman
> Data Munger Guru
>
> What is the problem that you are trying to solve?
> Tell me
Hi,
Many thanks in advance for whatever advice / input I may receive.
I have a propensity score matching / data imputation question. The purpose
of the propensity
score modeling is to put subjects from two different clinical trials on a
similar footing so that a key
clinical measurement
Thank you both.
The issue was I didn't declare the database as a data frame and I also
forgot the comma...
ene=as.data.frame(data)
attach(ene)
View(ene[ene$fact>5000,])
The code listed did the trick I desired.
Again, thanks I can say the problem is solved.
On Thu, Mar 16, 2017 at 3:32 PM, Jef
On Thu, 16 Mar 2017, alfonso.carf...@uniparthenope.it wrote:
Hi all,
I want to ask you which is the difference between the specifyng and not
specifyng the covariance matrix of the estimated coefficients when
performing the coeftest command.
coeftest(object, ...) computes Wald statistics f
Hi Paul,
As Peter noted, without knowing the structure of the the object, only
a guess can be made. Mine is:
fdf<-data.frame(Date=names(forecast),forecast=forecast)
You may want to apply as.numeric to the names.
Jim
On Thu, Mar 16, 2017 at 11:43 PM, Paul Bernal wrote:
> Dear all,
>
> Hope yo
Hi all,
I want to ask you which is the difference between the specifyng and
not specifyng the covariance matrix of the estimated coefficients when
performing the coeftest command.
I'm estimating a VECM model and I want to test the significance of the
short-run casual effects of the expla
you are probably missing a comma:
View(data[data$fact > 5000, ])
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
On Thu, Mar 16, 2017 at 11:16 AM, Juan Ceccarelli Arias
wrote:
> Hello,
> I need to show the
Dear friends,
I am currently using R version 3.3.3 (64-bit) and used the following code
to generate forecasts:
> library(forecast)
>
> library(tseries)
‘tseries’ version: 0.10-35
‘tseries’ is a package for time series analysis and computational
finance.
See ‘library(help="tseries")
Presuming "data" is a data frame because you have not provided a minimal
reproducible example as requested in the Posting Guide... note also that "data"
is the name of a function in base R, so that is a potentially troublesome
variable name.
A data frame is a list of vectors. It can be indexe
Hi all,
I have the following data called "data1". After fitting the ancova model
with different slopes and intercepts for each region, I calculated the
regression coefficients and the corresponding standard error. The standard
error (for intercept or for slope) are all the same for different regi
Hi Georg,
If you remove the coord_polar, you'll see that the optimal y-value for the
labels is between the upper and lower bound of the stacked bar-element.
I am not sure it is the most elegant solution, but you can calculate them
like this:
df <- data.frame(group = c("Male", "Female", "Child"),
Hello,
Maybe you're missing a comma. (I'm assuming your dataset is a data.frame
or a matrix.)
Try
View(data[data$fact>5000, ])
To give you a better answer you need to show us the output of
str(data)
And don't name your data 'data', it already is the name of an R function.
And post in plain
Amazing! Thanks for your kindness.
On Thursday, 16 March 2017, 20:38, PIKAL Petr
wrote:
Hi
You can achieve exactly what you want by using ave/na.locf twice
dat<-data.frame(ie=rep(letters[1:3], each=3), iw=rnorm(9))
dat[c(3, 4),2]<-NA
> dat
ie iw
1 a 1.07254438
2 a 0.530
Hello,
I need to show the observations of a data set only if the earn more than
$5000 (fact is its name in the date set). I use this:
View(data[data$fact>5000])
The code above shows nothing. No error or message at all.
What am i doing wrong?
Thanks for your help and time.
[[alternative H
Check my fitted dimension:str(predict(mod, Test1))
Named num [1:2131] 402 2346 1995 2205 2895 ... - attr(*, "names")= chr
[1:2131] "1" "2" "4" "6" ...
So i want to see AUC score for my model being applied into Test1data after
having splitting total data (Train) into Train 1 and Test 1, but i g
>
> on Tue, 14 Mar 2017 21:54:42 +0100 writes:
> I found it:
> quantile(ordered(1:10), probs=0.5, type=1)
> works, because type=1 seems to round up or down, whatever. The default
option for is 7, which wants to interpolate, and then produces the error.
> Two opt
Hi John. Thanks much for your help. It is great to know this.
Hanna
2017-03-16 8:02 GMT-04:00 Fox, John :
> Dear Hanna,
>
> You can test the slope in each non-reference group as a linear hypothesis.
> You didn’t make the data available for your example, so here’s an example
> using the linearHy
Hi All,
I have a question to ggplot 2. My code is the following:
-- cut --
library(ggplot2)
library(scales)
df <-
data.frame(group = c("Male", "Female", "Child"),
value = c(25, 25, 50))
blank_theme <- theme_minimal() + theme(
axis.title.x = element_blank(),
axis.title.y = el
Sorry. I focused on the table and not the record selection. Given the table
this seems to be what you are looking for, but there may be an easier way:
> keep <- which(t(apply(DF2.tbl, 1, cumsum)) > .01, arr.ind=TRUE)
> keep <- keep[order(keep[, 1], keep[, 2]), ]
> keep # These are the records
Just add whatever further code to decorate the groups as you like
within the panel.groups function. I believe I have given you
sufficient information in my code for you to do that if you study the
code carefully. Depending on what you decide to do -- which is
statistical and OT here (and not someth
Use
plot(NA, xlim=c(0, 5), ylim=c(-35, 35), type="n", axes=FALSE, ann=FALSE)
to set up the length of the y axis instead of your first plot command.
-
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352
-Original
Something like this?
> DF2.agg <- aggregate(DF2$obs, DF2[, c("family", "time")], mean)
> DF2.tbl <- xtabs(x~family+time, DF2.agg)
> DF2.tbl time
family WEEK1 WEEK2 WEEK3 WEEK4
A 0.00 0.50 0.50 0.00
B 0.67 0.00 0.50 0.00
C 0.00 0.00 0.00 1.00
You can get closer to t
Yay! That worked! Thanks so much!
Jen
On Thu, Mar 16, 2017, 9:28 AM David L Carlson wrote:
> Use
>
> plot(NA, xlim=c(0, 5), ylim=c(-35, 35), type="n", axes=FALSE, ann=FALSE)
>
> to set up the length of the y axis instead of your first plot command.
>
> -
>
> Unfortunately, that doesn't work. The axis automatically scales to (-30,
> 25, by 5).
Your data do not extend to ±35 so the axis limits you have asked axis() for are
outside the plot region. it is plot() that is (correctly) defaulting to the
data range. if you want to override that to get a
Hi
You can achieve exactly what you want by using ave/na.locf twice
dat<-data.frame(ie=rep(letters[1:3], each=3), iw=rnorm(9))
dat[c(3, 4),2]<-NA
> dat
ie iw
1 a 1.07254438
2 a 0.53067188
3 a NA
4 b NA
5 b -0.09767088
6 b -1.02719060
7 c 2.35787246
8 c -0.0
Hi Jim,
Thanks for replying.
Unfortunately, that doesn't work. The axis automatically scales to (-30,
25, by 5).
Jen
On Wed, Mar 15, 2017, 10:09 PM Jim Lemon wrote:
> Hi Jen,
> It seems way too simple, but does this work?
>
> axis(side=2,at=seq(-35,35,by=5),cex.axis=0.7)
>
> You may want
You're not giving us much to play with here. Reproducible example, please.
(Remember to send it to the list, not me.)
My immediate guess was cbind(), but without knowing the data structure, I can't
tell for sure.
-pd
> On 16 Mar 2017, at 13:43 , Paul Bernal wrote:
>
> Dear all,
>
> Hope you
Hi. Thanks for the function. My bad, after looking at the csv file, it seems
that NA values come not only from previous Non-NA values but also from the next
Non-NA values. Example:
| NCQ05 | 11.395 |
| NCQ05 | 11.395 |
| NCQ05 | |
| NCQ06 | |
| NCQ06 | 13 |
| NCQ06 | 13 |
If i use the functi
Dear all,
Hope you are doing great. Some R time series functions generate the
forecasts in an horizontal way, for example:
2017 2018 20192020
forecast12 153575
but I´d like to have the output as follows:
Date forecast
2017
Hi - running rseek.org
with
simulate structutral model data
seems to give some inputs?
BW
Troels
Den 16-03-2017 kl. 12:34 skrev Michael Haenlein:
Dear all,
I am looking for an R package or code that allows me to simulate data
consistent with a given structural equation model. Essentially my id
Dear Hanna,
You can test the slope in each non-reference group as a linear hypothesis.
You didn’t make the data available for your example, so here’s an example
using the linearHypothesis() function in the car package with the Moore
data set in the same package:
- - - snip - - -
> library(car)
>
Dear all,
I am looking for an R package or code that allows me to simulate data
consistent with a given structural equation model. Essentially my idea is
to define (a) the number of endogenous and exogenous latent variables, (b)
the strength of relationship between them and (c) the way of measurem
> On 15 Mar 2017, at 16:32 , Leemann, Lucas T wrote:
>
> Hello,
>
> I was trying to test whether two medians are identical or not and used the
> function “mood.test” from the “stats" package. My co-author, a medical
> doctor, was trying to do the same in SPSS and had different results.
stats
Hi
why nonumeric values in data identifier matters?
Some toy data
dat<-data.frame(ie=rep(letters[1:3], each=3), iw=rnorm(9))
dat[c(2, 4,6, 9),2]<-NA
library(zoo)
ave(dat$iw, dat$ie, FUN=function(x) na.locf(x, na.rm=FALSE))
You can use ave together with na.locf to propagate nonumeric values only
dear Bert,
thank you for the solution, it worked perfectly. However I still would
like to know how reliable are the dots that are plotted, that is why i
would like to have individual bars on each dot (if possible). the
standard deviation maybe is not the right tool and the confidence
interval is pe
40 matches
Mail list logo