Changing mu in svyttest for one sample test

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing mu in svyttest for one sample test

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]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Changing mu in svyttest for one sample test

Peter Dalgaard-2
Subtract mu from the outcome?

-pd

> On 25 Mar 2020, at 19:22 , Mavra Ahmed <[hidden email]> 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]]
>
> ______________________________________________
> [hidden email] 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: [hidden email]  Priv: [hidden email]

______________________________________________
[hidden email] 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.