Re: [R] Changing mu in svyttest for one sample test

2020-03-26 Thread peter dalgaard
Subtract mu from the outcome?

-pd

> On 25 Mar 2020, at 19:22 , Mavra Ahmed  wrote:
> 
> Hi All,
> 
> I am doing a one-sample t-test for survey data with replicates (svrepdesign).
> I was wondering if there is a way to change the mu in svyttest for one sample 
> test? I can't find a way to do this online for svyttest but I was able to do 
> it for ttest.
> for example; in the following, I can change the mu to be a known standard (in 
> this case, 15):
> ttest(dataset$outcome, mu=15)
> 
> For svyttest, I can only do as follows:
> svyttest(outcome~0, dataset)
> svyttest(outcome~1,dataset)
> but I want to test my mean against a known standard (e.g. 15 as in the above 
> case) using svyttest. Is there a way to do this? If not, what would be 
> another way to test this?
> 
> Thanks for your help,
> Mavra
> 
> 
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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-contained, reproducible code.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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-contained, reproducible code.


[R] Changing mu in svyttest for one sample test

2020-03-25 Thread Mavra Ahmed
Hi All,

I am doing a one-sample t-test for survey data with replicates (svrepdesign).
I was wondering if there is a way to change the mu in svyttest for one sample 
test? I can't find a way to do this online for svyttest but I was able to do it 
for ttest.
for example; in the following, I can change the mu to be a known standard (in 
this case, 15):
ttest(dataset$outcome, mu=15)

For svyttest, I can only do as follows:
svyttest(outcome~0, dataset)
svyttest(outcome~1,dataset)
but I want to test my mean against a known standard (e.g. 15 as in the above 
case) using svyttest. Is there a way to do this? If not, what would be another 
way to test this?

Thanks for your help,
Mavra



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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-contained, reproducible code.